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

  • 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? – BrettAM Jan 18 '15 at 23:02

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

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.