Program often start with declarations like:
int led = 13;
Then led gets used in a loop somewhere to perhaps turn on or off an led:
of course after declaring the pin as an output. What I wish to do seems like it should be simple, but after many attempts, it has not yet worked for me. This is what I'd like to do:
I have already written a program on my pc that sends serial commands to the arduino at the press of a button. I want that command to set led to 13 (or some other value of my choosing) and then for the appropriate led to light up. I expect the pc also to be able to CHANGE that value on the fly if need be. Anybody done something like this or know how to?
Awaiting excellent replies.