API Digital Read Command sets PIN LOW

Hi all, I have been playing with the BoltIOT on and off for a few months. I have been able to use the Bolt cloud functions to turn a LED on and OFF using the DigitalWrite function.

However when you use the DigitalRead or MultiDigitalRead function it sets the state back to LOW if it was previously HIGH.

eg.
https://cloud.boltiot.com/remote/xxxxxxx-f996-4b0a-81bc-dfa4d3a641a7/digitalWrite?pin=1&state=HIGH&deviceName=BOLT199999

with this command I can turn the LED on that is plugged into Pin 1

if I then use this command

https://cloud.boltiot.com/remote/xxxxxxx-f996-4b0a-81bc-dfa4d3a641a7/digitalRead?pin=1&deviceName=BOLT199999

It sets PIN 1 LOW and turns off the LED.

Am I missing something about this API call command?

you didn’t mention the state rit?

When you read the pin you don’t specify state. You only specify state on a digital write
Thanks

led is o/p device. digitalread doesn’t play a role here.

Ok thanks… so DigitalRead should only be used to read the status of a pin when a voltage is being applied to it.

Hi @jmucha,

While the answer given by @laicosnetcom, is correct, but it is incomplete.

Digital read is used to read whether the voltage value set to the pin from an external source (such as a digital sensor), is a high state (above 1.5v) or a low state (below 1.5v).

To do this, the Bolt WiFi module has to set the pin as an Input pin, and pull it low. This stops the current from flowing into the LED that you have connected.

1 Like

Hii sir is there any solution to use the Digital read function without getting the state to go back to LOW.