Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

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

share|improve this question
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 at 23:02

1 Answer 1

up vote 0 down vote accepted

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

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

Simple.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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