livebox:hah_hahnode

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
livebox:hah_hahnode [2014/01/20 08:58] brettlivebox: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.  If not all ports are not being used they can be individually disabled by leaving them out of the endpoint definition or by setting their value to 0 (zero). 
- 
-{{:livebox:output-node-sequence-diagram.png|}} 
- 
-Snippet of configuration information needed in the jeenodeApplet.lua source. 
-<code> 
-OutputNode = require("xap.outputnode").OutputNode 
- 
-local nodes = { 
-  [ID]=OutputNode{instance="jeenode:attic"},endpoints={p1=1,p2=1,p3=1,p4=1}} 
-} 
-</code> 
- 
-So now we can simply use a xAPBSC.cmd class message to control these newly created endpoints.  Here is an example of turning on JeeNode Port 1 from the above configuration. 
-<code> 
-xap-header 
-{ 
-v=12 
-hop=1 
-uid=FF000F00 
-class=xAPBSC.cmd 
-source=dbzoo.livebox.demo 
-target=dbzoo.livebox.jeenode:attic.p1 
-} 
-output.state.1 
-{ 
-id=* 
-state=on 
-} 
-</code> 
- 
-Controlling an OutputNode from the Joggler in this video we simply toggle 4x LEDs on/off. 
- 
-[[http://www.youtube.com/watch?v=5JBmlpjOBqw|HAH remote control of JeeNodes using a Joggler]] 
- 
-This node provides the following endpoints (p1,p2,p3,p4) for example: 
-<code> 
-dbzoo.livebox.jeenode:attic.p1 
-dbzoo.livebox.jeenode:attic.p2 
-dbzoo.livebox.jeenode:attic.p3 
-dbzoo.livebox.jeenode:attic.p4 
-</code> 
- 
-We can rename them like this to produce ''dbzoo.livebox.jeenode:attic.port1'' etc.. 
-<code> 
-local nodes = { 
-  [ID]=OutputNode{instance="jeenode:attic",endpoints={p1="port1",p2="port2",p3="port3",p4="port4"}} 
-} 
-</code> 
  
 ===== Infrared Receiver node ===== ===== Infrared Receiver node =====
  • livebox/hah_hahnode.txt
  • Last modified: 2014/02/15 11:52
  • by minerva9