working with servos
1. take a serve – share as i have a limited number
2. copy paste this code into a new sketch:
#include <Servo.h>
Servo myServo;
int servoPin = 2;
void setup()
{
myServo.attach(servoPin);
}
void loop()
{
myServo.write(90);
delay(20);
}
3. connect the servo to your Arduino like this
red to 5v
black to GND
white to pin 2
run it. What happens? What happens if you change the number in this line: myServo.write(90);?
project wrap up – respond to these questions in a blog post
Written response to:
What is the goal of this project?
What is the learning goal of this project?
What tools were used in the making of your stoplight?
What did you learn while doing this project?
How do you feel about your project? Did you enjoy it? Was it difficult?
What would you like to learn more about?