Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "motor.h"
- // Motor A connections
- int enA = 9;
- int in1 = 8;
- int in2 = 7;
- // Motor B connections
- int enB = 3;
- int in3 = 5;
- int in4 = 4;
- Motor m1;
- Motor m2;
- void setup() {
- m1.setPinuot(9, 8, 7);
- m2.setPinuot(3, 5, 4);
- }
- void loop() {
- m1.setVelocidad(200, false);
- m1.arrancar();
- delay(1000);
- m1.parar();
- delay(1000);
- m1.arrancar();
- delay(1000);
- m1.parar();
- delay(1000);
- m1.setVelocidad(-200);
- delay(1000);
- m1.off();
- delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement