Will using something like this to operate the button function to set it as more of a process work in the way I was describing earlier?
#include <Button.h>//http://www.arduino.cc/playground/uploads/Code/Button.zip
const byte ledPin = 13;
Button button = Button(12,PULLUP);
void setup(){
pinMode(ledPin,OUTPUT); //debug to led 13
}
void loop(){
if(button.uniquePress()){//button.isPressed() will cause the code to execute as long as button is pressed
//enter loop code here
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
delay(1000);
//end loop code
}
}
Also, with your help I got the code working so that it does change through all three values, but the relays still want to flicker back and forth which I assume is the way the button is set-up currently. I will try to implement the above button code and library to see if I can get it to work the way I want it to.