Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const int motorA = 5;
  2. const int motorB = 6;
  3. const int dirA = 7;
  4. const int dirB = 8;
  5. void setup() {
  6. pinMode(motorA, OUTPUT);
  7. pinMode(motorB, OUTPUT);
  8. pinMode(dirA, OUTPUT);
  9. pinMode(dirB, OUTPUT);
  10. }
  11.  
  12. void loop() {
  13. digitalWrite(dirA, HIGH);
  14. digitalWrite(dirB, LOW);
  15. analogWrite(motorA, 150);
  16. analogWrite(motorB, 150);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement