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

310        Making Things Move





               FIGURE 10-22 Two steppers wired to photocells





































                 9. Jump power and ground to the breadboard from the Arduino GND and
                     5V pins. See Figure 10-23 for the full setup.


                10. Now we will try some code that uses the photocells to move the stepper
                     motors. Type in the following code, verify it, and upload it to the Arduino.
                     /*
                     Using photocells to drive two stepper motors
                     with an Arduino through SparkFun's EasyDriver v4.3
                     CC-GNU GPL by Ben Leduc-Mills and Dustyn Roberts
                     Created: 2010.06
                     */
   328   329   330   331   332   333   334   335   336   337   338