livebox:hah_arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
livebox:hah_arduino [2012/05/12 15:39] – [HAH and the Arduino] minerva9livebox:hah_arduino [2012/05/14 21:31] (current) – [LED control with a BSC schema] minerva9
Line 59: Line 59:
 ====== Ethernet xAP Arduino Library ====== ====== Ethernet xAP Arduino Library ======
  
-To aid writing xAP compliant applications for the Arduino an xAP processing library has been written.  This allows Arduino to be connected to your LAN and will transmit xAP messages without any HAH involvement. See http://wiki.london.hackspace.org.uk/view/Project:Ethernet_Arduino+To aid writing xAP compliant applications for the Arduinoan xAP processing library has been written.  This allows Arduino to be connected to your LAN and will transmit xAP messages without any HAH involvement. See http://wiki.london.hackspace.org.uk/view/Project:Ethernet_Arduino
  
 These are the classes exposed by the library.  Grab the source and browse to see the inner working. These are the classes exposed by the library.  Grab the source and browse to see the inner working.
Line 197: Line 197:
  
 Step 3. Now we will create a Lua [[hah_plugboard_v2|plugboard]] applet and a BSC endpoint so this LED can be easily controlled.  This will take care of converting the xAPBSC.cmd message into a xap-serial message for us, along with providing xAPBSC.query capabilities, and regular xAPBSC.info reporting about the status of our LED. Step 3. Now we will create a Lua [[hah_plugboard_v2|plugboard]] applet and a BSC endpoint so this LED can be easily controlled.  This will take care of converting the xAPBSC.cmd message into a xap-serial message for us, along with providing xAPBSC.query capabilities, and regular xAPBSC.info reporting about the status of our LED.
-Like all Plugboard scripts, this must be placed in the /etc/plugboard directory on the HAH. The vi editor is included in the HAH Busybox operating system build, so you can create/edit the script directly from a Telnet session onto the HAH. Remember that your script filename must end in 'Applet.lua' (case sensitive).+ 
 +Like all Plugboard scripts, this must be placed in the /etc/plugboard directory on the HAH. The vi editor is included in the HAH Busybox operating system build, so you can create/edit the script directly from a Telnet session onto the HAH (default username/password is root/admin). Remember that your script filename must end in 'Applet.lua' (case sensitive). Also check that you have enabled the plugboard scripting engine and the serial schema services via the HAH web UI (Automation/Assists tab).
  
 <code lua> <code lua>
Line 254: Line 255:
 Step 4. Restart the plugboard daemon to make sure the new Applet is loaded. One easy way to do this is to reboot the HAH. Step 4. Restart the plugboard daemon to make sure the new Applet is loaded. One easy way to do this is to reboot the HAH.
  
-Step 5. Send a BSC control message to our endpoint and turn the LED on/off. An easy way to send BSC control messages is to use xFx Viewer.+Step 5. Send a BSC control message to our endpoint and turn the LED on/off. An easy way to send BSC control messages and to view the new LED endpoint itself is to use [[http://www.edjo.pwp.blueyonder.co.uk/edward/xAP/xFx/viewer_main.htm|xFx Viewer]]. 
 + 
 +<note tip>With xFx Viewer you can't send a new message directly. You need to open any arbitrary message, edit it and then press 'send'.</note> 
 <code> <code>
 xap-header xap-header
Line 271: Line 275:
 } }
 </code> </code>
- 
 ====== Arduino links ====== ====== Arduino links ======
  
  • livebox/hah_arduino.1336837160.txt.gz
  • Last modified: 2012/05/12 15:39
  • by minerva9