Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
livebox:hah_hahnode [2014/01/20 08:58] – brett | livebox:hah_hahnode [2014/01/20 09:01] – [Output Node] brett | ||
---|---|---|---|
Line 350: | Line 350: | ||
- | ===== Output Node ===== | ||
- | |||
- | The OutputNode sketch, and matching Lua class, exposes the digital ports 1-4 as I/O controllable xAPBSC endpoints. | ||
- | |||
- | {{: | ||
- | |||
- | Snippet of configuration information needed in the jeenodeApplet.lua source. | ||
- | < | ||
- | OutputNode = require(" | ||
- | |||
- | local nodes = { | ||
- | [ID]=OutputNode{instance=" | ||
- | } | ||
- | </ | ||
- | |||
- | So now we can simply use a xAPBSC.cmd class message to control these newly created endpoints. | ||
- | < | ||
- | xap-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF000F00 | ||
- | class=xAPBSC.cmd | ||
- | source=dbzoo.livebox.demo | ||
- | target=dbzoo.livebox.jeenode: | ||
- | } | ||
- | output.state.1 | ||
- | { | ||
- | id=* | ||
- | state=on | ||
- | } | ||
- | </ | ||
- | |||
- | Controlling an OutputNode from the Joggler in this video we simply toggle 4x LEDs on/off. | ||
- | |||
- | [[http:// | ||
- | |||
- | This node provides the following endpoints (p1, | ||
- | < | ||
- | dbzoo.livebox.jeenode: | ||
- | dbzoo.livebox.jeenode: | ||
- | dbzoo.livebox.jeenode: | ||
- | dbzoo.livebox.jeenode: | ||
- | </ | ||
- | |||
- | We can rename them like this to produce '' | ||
- | < | ||
- | local nodes = { | ||
- | [ID]=OutputNode{instance=" | ||
- | } | ||
- | </ | ||
===== Infrared Receiver node ===== | ===== Infrared Receiver node ===== |