
Robot Magic: Beginner Robotics for the Maker and Magician 61
more easily. You can also
adjust the code! Change
snake.write(30);
to snake.write(10);
That will make the arm
move out farther. Change
snake.write(160); to
snake.write(180);.
That will designate the
servo’s starting position
closer to the can.
• Once you are satisfied with everything, unplug your
board from the computer, attach the battery clip to the
9V battery, but leave the power plug unplugged from the
board for now.
• Tape down your wires, and mount your Arduino and
battery onto the back of the can. A loop of duct tape for the
board and another for the battery works well (Figur ...