-->
Page 1 of 1

Read Status of Output Pin

PostPosted: Mon Dec 14, 2015 2:40 pm
by JMS
Is there a way to read the status of an output pin into a variable?
I can see the status under the /vars page but when I try to read it with pi it changes the state of the pin.

I think that ESP8266 Basic is a great platform for the ESP so much potential here!

JMS

Re: Read Status of Output Pin

PostPosted: Mon Dec 14, 2015 7:40 pm
by Mmiscool
Normally this would be done with a tracking variable in basic.

assign a value to a variable.
Set the pin to that value.
Read the variable to check what you last set the in to.

I am not oped to implementing this in the functions but it could be confusing.

Re: Read Status of Output Pin

PostPosted: Tue Dec 15, 2015 8:19 am
by JMS
Thanks. I figured that might be the way I'd have to it.