Hi,
I am looking for the simplest way to send numbers over usb to an uno from a c# program and from the uno to the c# program?
There's a lot of example code but what's the simplest way?
The idea is this;
The uno will be programed with a set of functions identified by numbers.
When the c# program sends a number, the arduino runs the corresponding function.
For example we'll say if the uno gets a 56
It runs function 56 of my sketch.
Function 56 could be anything but for this example we'll say it sets all output pins to 0 then checks all input pins, does a calculation and sends a number back to the c# program. What exactly each number does is irrelevant.
All I want is to send numbers back and forth.
I can figure the rest out.
Edit; I have been reading up on this. Eventually I'll figure it out but at the moment I am confused.