Data Sheet

23 : circuit 1b
ARDUINO
PRO TIP
ARDUINO SERIAL MONITOR: The
Serial Monitor is one of the Arduino IDE’s
many great included features. When
working with embedded systems, it helps
to see and understand the values that your
program is trying to work with, and it can
be a powerful debugging tool when you
run into issues where your code is not
behaving the way you expected it to. This
circuit introduces you to the Serial Monitor
by showing you how to print the values
from your potentiometer to it. To see these
values, click the Serial Monitor button,
found in the upper-right corner of the IDE in most recent versions. You can also select
Tools > Serial Monitor from the menu.
You should see numeric
values print out in the
monitor. Turning the
potentiometer changes the
value as well as the delay
between each print.
If you are having trouble
seeing the values, ensure
that you have selected 9600
baud and have auto scroll
checked.
Blink
Serial Monitor
Blink | Arduino 1.8.5
Arduino/Genuino Uno on/dev/cu.usbserialDNO18JWS
Serial Monitor button
in the upper-right of
the Arduino IDE.
Serial Monitor printout
and baud-rate menu.
CODE TO NOTE
INTEGER VARIABLES:
int potPosition;
A variable is a placeholder for values that may change
in your code. You must introduce, or “declare,”
variables before you use them. Here we’re declaring a
variable called potPosition of type int (integer). We
will cover more types of variables in later circuits. Don’t
forget that variable names are case-sensitive!