IoT Command Reference
The JavaScript commands are used for controlling IoT devices connected to AppShed apps. The devices must be running the AppShed IoT Arduino sketch.
Read Values
The following commands are used to read pin values/states from the device:
app.getPin(n) - This will return the value of pin n (n being the pin number, 0 to 39)
app.setPin(n,val) x - Set the value of pin "n" to the value "val". For digital pins, val should be 0 or 1. For analog pins, val can be 0-1024.
app.analogRead(n) x - Returns the value of analog pin n.