Is there any method to find whether a digital pin is at HIGH or LOW state? For example, pin 0 is HIGH or LOW?
There is no way to check if your output pin is HIGH or LOW. But you can USE flag method, to check if the pin was previously changed by you.
flag1 = 0;
flag1 = 1
if (flag1 = 0):
printf(“Pin 1 is OFF”)
printf(“Pin1 is ON”)
You can use digitalRead(pin); to read status of pin 0
You can connect the pin 0 output to other GPIO pin as input and read the status for your pin 0 using
Corrrection - mybolt.digitalRead(‘0’)
You can read the status of pin like in arduino, but with this you can’t check the status of your pin, whether your LED is ON or OFF.
Bolt IoT has introduced a new feature for the Cloud Pro users recently, with which you can pull your historic data. So, in the upcoming days, you’ll be introduced with methods and functions to check the last status of your PIN. Whether your LED was turned ON or OFF by you.