Page 341 - Making things move_ DIY mechanisms for inventors, hobbyists, and artists
P. 341

318        Making Things Move





                18. Cut off the RC plug that comes on the solar charger wires. Separate the two
                     wires and strip the insulation off the ends to expose about 1/4 in of wire. To
                     figure out which one is positive and which one is negative, use your multimeter.
                     The black lead should be in the COM connection, and the red lead in the
                     voltage-measuring connection, just as for testing batteries (see Figure 5-1 in
                     Chapter 5). Now touch the red lead to one of the solar panel wires and the
                     black lead to the other. If the reading on your multimeter is positive, you
                     guessed right. If not, you guessed wrong.

                19. Do this with both solar panels and squish both negative wires in the charge
                     controller on the remaining negative terminal. Each positive wire gets its own
                     screw terminal on the far right of the charge controller (see Figure 10-27).

                20. If you’ve done everything right, your motors should be moving! Make sure the
                     switch on the charge controller is on. You’ll want to put your solar panels in a
                     sunny spot so the battery can charge as the motors use up the initial charge.

                21. Now let’s make SADbot draw something interesting. Cut two approximately
                     5 ft lengths of fishing line and tie each on through the hole in the center of
                     the pulleys. Tie the other ends of the line to a spring clamp and clamp onto
                     a marker. Mount the white paper on your canvas board with tape or clamps
                     (refer to Figure 10-24).

                22. Let’s tell the stepper motors to draw in random directions by default, and then
                     to behave as they did before when someone is covering a photocell. This will
                     create a drawing like the ones SADbot made in Eyebeam’s window gallery (see
                     Figure 10-28). You can install SADbot the same way if you just solder some
                     hook-up wire to each photocell and position them however you want.

                23. Type, verify, and then upload the following code to the Arduino.

                     /*
                     SADbot v.03

                     SADbot will draw a random distance in random direction until a
                     photocell is blocked. When SADbot detects a photocell has been blocked, it
                     will draw towards it. Stepper motors are driven through SparkFun's
                     EasyDriver v4.3
   336   337   338   339   340   341   342   343   344   345   346