Closed roccomuso closed 7 years ago
The code example is buggy, in that you're running setup
and then immediately (before read_state
is called) running destroy
.
But I'm going to leave this open and have a go at re-creating it because I still wouldn't expect it to turn the pin off.
I can't re-create this. After running the (fixed) code, it sets up with a value 'on'. The read operation doesn't change its state.
The new version 0.8.0 of the module allows you to explicitly set the pin into a high or low state so perhaps you may want to use that in order to setup the pin in the desired state.
This is my code:
When i call exports.get(11) it actually turns off the gpio 11 and print 'the value is: off'.
Why is turning off the Pin? o.O