onto its charging dock. The Open Interface has a built-in
Seek Dock command (opcode 139) you can send to start
the built-in Roomba docking algorithm. Writing the code
yourself gives you an appreciation of the technology inside
Web Remote Control
At an outreach event, there isn’t time to teach the
visitors how to program. We just let
them drive the robots around. For
outreach, the PiCreate runs a simple
32-line web server written in Python,
and we connect to the robots with a
web browser using a phone or tablet.
You’ll find all the web-control source
code in this article’s download section.
Figure 5 shows the web browser
remote control. There are two basic
modes: DRIVE and PROGRAM. In
DRIVE mode, the user clicks the
buttons to move the robot around.
In PROGRAM mode, the user builds
up a script of buttons for the robot
to execute when the RUN button is
clicked. We set out a couple of orange
cones and challenge the visitors to
write a script to navigate around them.
Learning to Swim with
Teaching robotics is a lot like
teaching students how to swim. The
PiCreate offers fun and challenges for
all levels of students. Some students
are inexperienced — a little scared
of the water/technology. They like
piddling around in the kiddie pool. Just
make the cable shown back in Figure
2 and let them write a few lines of
Python to move the wheels.
Eventually, their curiosity will
lure them to the shallow end of the
pool where their peers are combining
sensors and motor commands to
make amazing reactive robots. Then,
one day, they find themselves bravely
venturing into the deep end where
the older students are adding new I2C
modules to the robot — like a SparkFun
line follower array or an Adafruit
NeoPixel LED grid.
STEM students are given the
opportunity to learn valuable hands-on skills and lessons.
What happens if your “print hello” function calls itself? You
can read about recursion all day long, but there is something
magical about coding up your first stack-overflow.
We lifeguards/mentors foster creativity and curiosity but
always under a professional protective eye. Curiosity killed
the proverbial cat. Less dramatically, in everyday life, curiosity
and creativity gives us wonders like duct-tape wallets and
peanut butter and Nutella sandwiches. SV
SERVO 09/10.2018 41