Figure 6-1
Measuring outputs with a multimeter
The multimeter needs to be set to its 0–20V direct current (DC) range.
The negative
lead (black) should be connected to the ground (GND) pin and the positive to D4. The
wire is just connected to the probe lead and poked into the socket headers on the Arduino
board.
Load sketch 6-01:
At the top of the sketch,
you can see the command
pinMode
. You should use this
command for every pin that you are using in a project so that Arduino can configure the
electronics connected to that pin to be
either an input or an output, as in the following
example:
As you might have guessed,
Dostları ilə paylaş: