Write Digital Output

Command : digitalWrite
Parameters :

  • pin: It is the Bolt GPIO you want to control. It can take any of the following values 0, 1, 2, 3, 4.
  • state: It is the output voltage to be provided on the GPIO. It can take value HIGH(3.3V) or LOW(0V).
  • deviceName: The name of the Bolt device you want to control.

Example:
https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalWrite?pin=0&state=HIGH&deviceName=BOLT13819450

  • this command will give 3.3 volts on pin 0
  • browser output: {"success": "1", "value": "1"}

https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalWrite?pin=0&state=LOW&deviceName=BOLT13819450

  • this command will give 0 volts on pin 0
  • browser output: {"success": "1", "value": "1"}

Command : digitalMultiWrite
Parameters :

  • pins: This is a CSV list of Bolt GPIO pins you want to control.
  • states: This is a CSV list, of states that you want the corresponding GPIO pins to be set to.
  • deviceName: The name of the Bolt device you want to control.

Example:
https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalMultiWrite?pins=4,1,2&states=HIGH,LOW,HIGH&deviceName=BOLT13819450

  • this command will give 3.3 volts on the GPIO pins 4 and 2, and 0 volts on pin 1.
  • browser output: {"success": "1", "value": "1"}

https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalMultiWrite?pins=2,1,3,4&states=LOW,HIGH,HIGH,LOW&deviceName=BOLT13819450

  • This command will give 3.3 volts on GPIO pins 1 and 3, and 0 volts on gpio pins 2 and 4
  • browser output: {"success": "1", "value": "1"}