0

I am trying to do an experiment with Arduino Uno r3 board plus a 2-channel relay shield. What I need to do is to alternatively turn on and off the relay shields. So, it requires multiple compile and upload of the program to assign values to corresponding pins. What I have seen by now is that uploading the program to Arduino is a kind of painful process and it requires nothing to be connected to pins 0 and 1 to prevent synchronization errors. So, I was wondering how I can do my experiment without having to mount/unmount relay shield each time I want to upload a new program into it.

Thanks in advance

user3684042
  • 153
  • 4
  • 1
    Would it be possible to just add some other kind of input to change what your sketch does while it is running without re-uploading? – BrettFolkins Jan 18 '15 at 23:02

1 Answers1

0

Well, you can write a program that takes numbers out of Serial input.

int pin1 = Serial.parseInt();
int pin2 = Serial.parseInt();
// etc., etc.

Simple.

Lux
  • 138
  • 6