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
tutorials_devicehub [2017/04/01 06:39]
admin [Data Transmission]
tutorials_devicehub [2017/04/01 06:50] (current)
admin [Sending Commands to the Nodes]
Line 222: Line 222:
  
 def act1_callback(payload):​ def act1_callback(payload):​
 +    global red
     print ACT1.state     print ACT1.state
     red = str(ACT1.state)     red = str(ACT1.state)
  
 def act2_callback(payload):​ def act2_callback(payload):​
 +    global green
     print ACT2.state     print ACT2.state
     green = str(ACT2.state)     green = str(ACT2.state)
     ​     ​
 def act3_callback(payload):​ def act3_callback(payload):​
 +    global blue
     print ACT3.state     print ACT3.state
     blue = str(ACT3.state)     blue = str(ACT3.state)
Line 263: Line 266:
 // pins for the LEDs: // pins for the LEDs:
 const int redPin = 8; const int redPin = 8;
-const int greenPin = 11+const int greenPin = 11;
 const int bluePin = 10; const int bluePin = 10;