//why is the message printing over and over again
#include <Servo.h>
Servo wiggly; //servo name is wiggly or turny
void setup() {
// put your setup code here, to run once:
//declare the output pins
pinMode(5,OUTPUT); //orange led
pinMode(6,OUTPUT); //blue led
pinMode(9,OUTPUT); //red led
pinMode(10,OUTPUT); //green led
//declare the push button as well as inputs
pinMode(2,INPUT); //Button a (RED input)
pinMode(7,INPUT); //Button D (Green Button)
pinMode(8,INPUT); //Button C (Yellow Button)
pinMode(12,INPUT); //Button B (blue Button)
//deigniate pin 11 as servo PGM pin
wiggly.attach(11);
//setup serial monitor to test the push button
Serial.begin(9600); //SEND INFO FROM ROBOT TO SERVO 9600 BITS PER SECOND
}
void loop() {
// put your main code here, to run repeatedly:
//simpel test 1: blink the orange light
//start by turning off all the leds
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
/*test my orange/amber led*/
if(digitalRead(2)) //red
{
digitalWrite(5, LOW); //5 is orange led
delay(1500);
digitalWrite(5, HIGH);
delay(1500);
}
}