Data Sheet
96 : circuit 5b
NEW CONCEPTS
ASCII CHARACTERS: ASCII is
a standard for character encoding,
formalized in the 1960s, that assigns
numbers to characters. When typing on
a computer keyboard, each character
you type has a number associated with
it. This is what allows computers to know
whether you are typing a lowercase “a,”
an uppercase “A” or a random character
such as ampersand (&). In this experiment,
you will be sending characters to the Serial
Monitor to move your remote-controlled
robot. When you send a character, the
microcontroller is interpreting that as a
specific number. ASCII tables available
online (http://sfe.io/ASCII) make it easier
to know which character is represented by
which number.
CONVERTING STRINGS TO
INTEGERS: String variables hold words
like “dog” or “Robert Smith” that are made
up of multiple characters. Arduino has a
set of special built-in methods for string
variables that you can call by putting a
period after the variable name, as follows:
string_variable_name.toInt();
The .toInt() method converts the string
to a number, and there are a dozen other
methods that can do things like tell you
the length of a word or change all of the
characters in a string to uppercase or
lowercase.
ASSEMBLY
Before you build this circuit, you’ll
need to make a few modifications to the
breadboard baseplate to make it more
robot-like!
. Cut and attach
two short pieces
of Dual Lock
tape to the very
corners of the
baseplate on the
side located under
the breadboard.
Circuit 5B:
Remote-
Controlled
Robot
In this circuit, you’ll control two motors
and build your own remote-controlled
roving robot! You will also learn how to
read information from a serial command
so that you can use the Serial Monitor to
tell the robot in what direction to move
and how far to move.
WHEELS DUAL LOCK TAPE BINDER CLIP SCISSORS
YOU
NEED
VM
VCC
GND
A01
A02
B02
B01
GND
PWMA
A12
A11
ST
BY
B11
B12
PWMB
GND
M
O
T
OR
DRIVER
H8106
MOTOR DRIVER GEAR MOTORS SWITCH JUMPER WIRES
(NOT INCLUDED)
SIK v4 Book Oct 13.indb 96 10/18/17 10:02 AM