A little question:
> I put a GPIO at 1 or 0 logic.
> Is possible re-read the actual status of this output?
> Python or shell.
>
You could connect your output pin to an input pin ...
A little question:
> I put a GPIO at 1 or 0 logic.
> Is possible re-read the actual status of this output?
> Python or shell.
>
You could connect your output pin to an input pin ...
Yes.
The output register is read when you read a pin set to output mode.
The easiest way from the shell (IMO) is to use the gpio command in wiringPi...
e.g.
gordon @ dragonpi: gpio mode 0 out gordon @ dragonpi: gpio write 0 1 gordon @ dragonpi: gpio read 0 1 gordon @ dragonpi: gpio write 0 0 gordon @ dragonpi: gpio read 0 0
See:
For more with the disclaimer that I write & maintain it...
Gordon
Gordon Henderson in data 21:14, sabato 27 luglio 2013, nel gruppo comp.sys.raspberry-pi ha scritto:
Thank. Good!
This is a generic answer, not Pi-specific: It depends on the design of the port, on how it was configured, and on the external circuitry connected to it. In most systems you can read back from an output pin, but what you read may be a copy what you wrote, even if the actual state is different, based on the factors before.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required