Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
livebox:hah_arduino [2012/05/12 15:35] – [Checking out from SVN] minerva9 | livebox:hah_arduino [2012/05/14 21:31] (current) – [LED control with a BSC schema] minerva9 | ||
---|---|---|---|
Line 9: | Line 9: | ||
* Arduino Ethernet (with a shield) | * Arduino Ethernet (with a shield) | ||
- | All can be interfaced with the HAH unit. | + | All can be interfaced with the HAH unit. Depending on your existing knowledge of things like FTP/the vi editor/unix style operating systems/the Lua scripting language, it might take you a little time to read up on these topics. However, the examples and support library code have been designed to help you along. |
Once a USB Arduino is connected it will be presented as a / | Once a USB Arduino is connected it will be presented as a / | ||
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. | + | To aid writing xAP compliant applications for the Arduino, an xAP processing library has been written. |
These are the classes exposed by the library. | These are the classes exposed by the library. | ||
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. | Step 3. Now we will create a Lua [[hah_plugboard_v2|plugboard]] applet and a BSC endpoint so this LED can be easily controlled. | ||
- | Like all Plugboard scripts, this must be placed in the / | + | |
+ | Like all Plugboard scripts, this must be placed in the / | ||
<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 |
+ | |||
+ | <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 ' | ||
< | < | ||
xap-header | xap-header | ||
Line 271: | Line 275: | ||
} | } | ||
</ | </ | ||
- | |||
====== Arduino links ====== | ====== Arduino links ====== | ||