Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Anschlussbelegung:
- *
- * Arduino Motor
- * D3 in4
- * D4 in3
- * D5 in2
- * D6 in1
- * 5V +
- * Gnd -
- *
- */
- #include <Stepper.h>
- int SpU = 2048; //SpU = Steps pro Umdrehung
- Stepper SM(SpU, 3,5,4,6);
- void setup(){
- SM.setSpeed(5);
- }
- void loop() {
- SM.step(2048);
- delay(1000);
- SM.step(-2048);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement