Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Para mudar a sequencia, torque o numero dos ports Ex:
- // #define IN1 6
- // #define IN2 5
- // #define IN3 7
- // #define IN4 4
- // Sequencia 7 6 5 4
- #define IN1 7
- #define IN2 6
- #define IN3 5
- #define IN4 4
- //------------------------------------
- void setup()
- {
- pinMode(IN1, OUTPUT);
- pinMode(IN2, OUTPUT);
- pinMode(IN3, OUTPUT);
- pinMode(IN4, OUTPUT);
- }
- //-------------------------------
- void loop()
- {
- digitalWrite(IN1, HIGH);
- digitalWrite(IN2, LOW);
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, LOW);
- delay(800);
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, HIGH);
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, LOW);
- delay(800);
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, LOW);
- digitalWrite(IN3, HIGH);
- digitalWrite(IN4, LOW);
- delay(800);
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, LOW);
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, HIGH);
- delay(800);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement