====== Stepper Motor ====== //__About this Article__// * **Author**: aaron --- aaron@cubietech.com --- 2014/02/27 20:59 * **Copyrights**: [[http://creativecommons.org/licenses/by-sa/3.0/|CC Attribution-Share Alike 3.0 Unported]] * **Contributors**: [[http://cubieboard.org/|Cubieboard Community]] : ... ===== Abstract ===== How to do this,please refer to [[http://docs.cubieboard.org/tutorials/arduino/controlling_led |light led]] and [[http://docs.cubieboard.org/tutorials/arduino/connecting|how to connect cubieboard and arduino]] {{:tutorials:arduino:照片_4.jpg|400}} {{:tutorials:arduino:照片_3.jpg|400}} ===== Schematics===== {{:tutorials:arduino:stepper_.jpg|400}} ==== Sorce Code==== #include #define STEPS 100 Stepper stepper(STEPS, 8, 9, 10, 11); int previous = 0; void setup() {   stepper.setSpeed(90); } void loop() {   int val = analogRead(0);   stepper.step(val - previous);   previous = val; } ===== Headline ===== === See Also === {{tag>Cubieboard Cubietruck}}