Hardware Reference
In-Depth Information
3. Insert a 10K potentiometer into the breadboard.
4. The pot will have three pins. Connect the pin on one side of the potenti-
ometer (it doesn't matter which) to the breadboard's positive rail.
5. Connect the pin on the other side of the potentiometer to the negative
rail.
6. Connect the center pin of the potentiometer to analog pin 0. Your circuit
should look something like Figure 4-7 or Figure 4-8 .
7. In the IDE, input the code from Example 4-2 and upload it to Galileo.
8. After uploading the code and opening the serial monitor, watch the text
as you turn the dial on the potentiometer from one side to another. You
should see something like this, or perhaps the reverse:
Potentiometer is at 0%.
Potentiometer is at 5%.
Potentiometer is at 9%.
Potentiometer is at 14%.
Potentiometer is at 22%.
Potentiometer is at 30%.
Potentiometer is at 39%.
Potentiometer is at 50%.
Potentiometer is at 62%.
Potentiometer is at 74%.
Potentiometer is at 89%.
Potentiometer is at 100%.
Search WWH ::




Custom Search