2 Input, output, PWM
Now we will hookup a servo motor and instruct it to behave a certain way.
The servo has 3 wires, we need to connect them all to the arduino.
red is for 5V
you will find it easy to plug one end of a jumper wire inside the connectors of the servo motor, and the other end to the corresponding pin of the Arduino make sure you use corresponding colors for the jumpers, in bigget setups messy wire can cause you more time to debug
black is for GND
to GND of the Arduino
and orange is for signal
signal is going into the pin of the Arduino we will use to control the servo motor We will look for a pin that has a wave next to the number ( look at the Arduino board). Those pins are able to output Pulse Width Modulation (PWM) is a fancy term for describing a type of digital signal. Pulse width modulation is used in a variety of applications including sophisticated control circuitry. Also in our case control the servo motor. The control wire is used to send this pulse. For more info how servos work look here []
Now with knowing where the examples are located, find a servo example sketch called sweep.
you should have a code that looks like this
Let's upload the sketch to the board
Observe the motor---->sweeping?
A new thing......Breadboarding
This terminology goes way back in the days.
Generally, you would mount electronic components to a piece of wood (the actual "breadboard"), and do all the wiring with point-point wire and the components just hanging between the various devices.
The story goes that an engineer had an idea for a vacuum tube device late one night. Looking around the house, the only base for his prototype that he found was indeed his wife's breadboard, from the breadbox.
A video by the Make magazine people
Ok, but why do we need to breadboard?
Well, they are useful for making temporary circuits and prototyping, and they require absolutely no soldering.
Prototyping is the process of testing out an idea by creating a preliminary model from which other forms are developed or copied, and it is one of the most common uses for breadboards.
The best way to explain how a breadboard works is to take it apart and see what’s inside.
connections lines are connected like this
let us include another agent into the servo situation.
A potentiometer to exercise some external control.
We will be using the potentiometer as a variable [voltage divider]