/*
#include <LiquidCrystal.h>
// LCD pins <--> Arduino pins
const int RS = 11, EN = 12, D4 = 2, D5 = 3, D6 = 4, D7 = 5;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);
void setup()
{
lcd.begin(16, 2); // set up number of columns and rows
lcd.setCursor(0, 0); // move cursor to (0, 0)
lcd.print("Arduino"); // print message at (0, 0)
lcd.setCursor(2, 1); // move cursor to (2, 1)
lcd.print("GetStarted.com"); // print message at (2, 1)
}
void loop()
{
}
*/
// Include the Servo library
#include <Servo.h>
// Declare the Servo pin
int servoPin = 6;
// Create a servo object
Servo Servo1;
int angles [] = {90, 170, 35, 160, 20, 175, 55, 145};
void setup() {
// We need to attach the servo to the used pin number
Servo1.attach(servoPin);
}
void loop () {
for (int count =0; count<9; count++){
Servo1.write(angles[count]);
delay(1000);
}
}
/*
void loop(){
// Make servo go to 0 degrees
Servo1.write(0);
delay(1000);
// Make servo go to 90 degrees
Servo1.write(90);
delay(1000);
// Make servo go to 180 degrees
Servo1.write(180);
delay(1000);
}
*/