Virtual gpio pins?

Hello, I have a server motherboard that has gpio pins that I can write a simple python script t he at can blink a led or use an oled screen to display the motherboard information. I was wondering if there is a way with arduino to do the same thing? Such as a virtual gpio pins.

Joseph

I am not clear where these virtual GPIO pins would be located ? Do you mean the ones on the motherboard ?

Hey UKHeliBob, what. I mean is on my server mother board It has gpio pins I can use them to do different things and control them all from a windows os or Linux of some kind.

I wanted to do the same thing with an arduino without having to upload new sketches all the time.

Yes it the basically same thing but the with the motherboard gpio pins I just need to write one script in python to write to the pins to do anything with arduino. I need to do the same thing and write the arduino code as well.

So every time I need to change code I have to write two scripts.

It's possible but I don't think that anyone in the Arduino world has ever done it.

Use Firmata or something so you can script to the Arduino.

Sorry, but I am still not getting what you want to do. Which "virtual pins" do you want to control using the Arduino and where are they located ?

If you mean that you want to control the "virtual pins" on the motherboard using an Arduino then something will need to be running on the PC to receive messages from the Arduino and to pass the commands to the pins. This could be a Python script and would only need to be written once

The Arduino would send commands to the Python script using a standard communications protocol that you design

If my assumptions about what you want to do are wrong then please explain in more detail what you want to do

That might do the trick. Only thing is relys on the libraries without it's code. The oled is not in it's library. How would I add that in there? Also can I do a normal blink led or pwm an led if needed?

So basically you're asking to be able to control the Arduino irrespective of any code running on the Arduino?

No, that is not possible. The only way to control any pins on the Arduino is to have some sort of code running on that Arduino. Only the processor on the Arduino can control its pins. There is no magic signal that allows the PC to take control of those.

You can write any sort of software you want for the Arduino though. Just write something that does all that you want and include some sort of communication protocol to talk to the PC.

I'm sorry I phrased that wrong. What I mean How does Firmata work? I'm seeing different things about it but maybe I'm miss understanding it.

It's just a program that runs on the Arduino and takes commands to do things with pins. I don't know a lot about it other than it being a very basic scripting interpreter for Arduino.

Maybe a board that supports MicroPython would work if you could figure out how to have your computer communicate directly with the REPL. I don't know a lot about MicroPython so I don't know if that's possible or not.