Pin Output value



I have a stateless python API that turn on/off a led on grovepi+ board.
Now I want to write a simple python api to ask to the raspberry pi if the led is on or off. Is it possible to get from the grovepi+ the status of a specific channel? For example if a digital channel’s value is 1 or 0 (led off/on)


Hi @mercantiandrea,

No, you won’t be able to read the status of a specific port.
You’d have to use in your Python program something like a dictionary that keeps track of your actuators (LEDs for instance).

Your dictionary would look like in the following example:

my_dict = {
'D2' : ['led', 'on'],
'D5' : ['led', 'off'],
'A0' : ['light', 131]
# ...

If you have any other questions, please let us know.

Thank you!