// Button Continuous int pbPin = 4; // read the button void setup() { pinMode(pbPin, INPUT); Serial.begin(9600); /* Begins USB Serial Interface. Button state is sent to host */ } void loop() { int button; button = digitalRead(pbPin); if (button == HIGH) { Serial.println("on"); } else { Serial.println("off"); } }