Write Servo Output
Pro API
This API is not a part of the Free plan. To upgrade to Bolt Cloud Pro click here.
NOTE : This API is only available for devices with firmware version 1.4.0 and above. To find out how to check and update the firmware version of your device click here.
Command : servoWrite
Parameters
- pin: It is the Bolt GPIO connected to the servo motor that you want to control. It can take any of the following values 0, 1, 2, 3, 4.
- value: It is the angle to which you want to set the servo motor. It can take a value between 0-180. NOTE: Some servo motors may not be calibrated, and may give a different output angle than expected.
- deviceName: The name of the Bolt device you want to control.
Example: - https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/servoWrite?pin=1&value=90&deviceName=BOLT1257632
- browser output for 90 degrees:
{"success":"1","value":"1"} - https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/servoWrite?pin=1&value=135&deviceName=BOLT1257632
- browser output for 135 degrees:
{"success":"1","value":"1"}
Command : servoMultiWrite
Parameters
- pins: This is a CSV list of Bolt GPIO pins which are connected to the servo motor you want to control.
- values: This is a CSV list of angles you want to set for the corresponding servo motors. The values can be in the range of 0 to 180. NOTE: Some servo motors may not be calibrated, and may give a different output angle than expected.
- deviceName: The name of the Bolt device you want to control.
Example: - https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/servoMultiWrite?pins=1,2,3&values=20,90,180&deviceName=BOLT1257632
- browser output :
{"success":"1","value":"1"}
Updated over 5 years ago