Push ButtonDigital input
Current is allowed to flow through from the AC side to the BD side when the button is pushed down, so input will read as “1” when pushed and “0” otherwise
Pull down resistorsNeeded for sensors with only two connections (legs)
◦ Photoresistor, push button
A 10k resistor goes between the sensor and the ground (GND), diverting current to the input pin on the Arduino
ServoServos can be rotated to specific angles
Unlike the stepper motor, these remember what angle they are rotated to when you turn them off an on again
The servo in your kit rotates about 120 degrees
Servo (cont’d)When you write a sketch using the servo, you will need to include the servo library
Sketch > Include Library > Servo
Next you will need to declare a variable of type “Servo”◦ Ex: Servo myservo;
In setup, use the function myservo.attach(pin) to tell the Arduino which pin will be controlling the servo (the one connected to the orange wire)
Use the function myservo.write(angle) to turn the servo to an angle
File > Examples > Servo > Sweep
Yellow connector tab must be switched from 3.3 to 5V
White button must be pressed down – green LED will turn on
Examples