Error in digitalWrite api


#1

I’m getting value 1 in both case when state is HIGH or LOW. i.e
{“value”: “1”, “success”: 1}


#2

hello@dtsuper3! are you talking about project 3:controlling led!or else kindly describe about your problem.


#3

When I’m hitting the API whatever I put in state value either HIGH or LOW I’m getting the same result.i.e {“value”:“1”,“success”:1}.
API documentation : [https://docs.boltiot.com/docs/write-digital-output-1]
According to API documentation I should get {“success”: “1”, “value”: “0”} when I put state value LOW in API request.


#4

Hi @dtsuper3,

There is typo error in the documentation. I will get it fixed from our team. In case of digital write, you will always get value 1 irrespective of HIGH or LOW.

For example :

HIGH

https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalWrite?pin=0&state=HIGH&deviceName=BOLT13819450  
{"success": "1", "value": "1"}

LOW

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

Thank you so much for raising the issue.