-->
Page 2 of 2

Re: Strange gpio behaviour

PostPosted: Fri Dec 12, 2014 4:11 pm
by Markus Gritsch
zeroday wrote:gpio.read() api put the pin into input mode.

Maybe this should be added as a comment in the "Manipulate hardware like a arduino" example on https://github.com/nodemcu/nodemcu-firmware

Like the example is currently written it makes one think that one can read the state of the output pin which was set in the preceding line.

Re: Strange gpio behaviour

PostPosted: Wed Jan 14, 2015 12:35 pm
by Fr4gg0r
In my opinion a read() should not alter the state of the gpio.
Here is a patch for that: https://github.com/jrahlf/nodemcu-firmw ... 3c3a58b7b7

I tested it and it works fine.