Hardware Reference
In-Depth Information
After launching the serial monitor, you should see a window with numbers
streaming by. Turn the dial and you'll see the numbers go up and down to
correspond with the position of the potentiometer. If you turn it all the way in
one direction, the numbers should approach 0 , and if you turn it all the way
in the other direction, the numbers should approach 1023 . It will look like the
example shown in FigureĀ 3-6.
Figure 3-6: Incoming serial data
NOTE Ifyou'regettingfunkycharacters,makesurethatyouhavethebaudrate
setcorrectly.Becauseyousetitto9600inthecode,youneedtosetitto9600in
thiswindowaswell.
You've now managed to successfully turn a dial and make some numbers
change; pretty exciting, right? No? Well, this is the just the first step. Next, you
learn about other types of analog sensors and how you can use the data from
analog sensors to control other pieces of hardware. For now, you use the familiar
LED, but in later chapters you use motors and other output devices to visualize
your analog inputs.
Search WWH ::




Custom Search