Pinstatus over com/serial port

Hi guys, this is my first post here, so sorry if i’m in the wrong place :frowning:

I have an Arduino Micro, that I want to make behave in a similar way to the gpio pins on the raspberry pi for testing purposes, and to make a python>arduino interface for teaching my kid to program.

Basically, what I want to know is, is it possible to (on request) send the state of all the pins to the attached computer? then is it possible to have it so the computer requests specific pins?



I think the answer to your question is YES.

You will need to write suitable software for the PC and for the Arduino.

I wrote a demo Python - Arduino program here. I'm not sure if it is what you have in mind.

If you are using the Arduino for teaching it might be more practical / more helpful and certainly much much easier to display the Arduino output in the Arduino IDE Serial Monitor.