Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define in1 6
- #define in2 5
- #define in3 9
- #define in4 3
- bool flag = true;
- void setup() {
- pinMode(in1, OUTPUT);
- pinMode(in2, OUTPUT);
- pinMode(in3, OUTPUT);
- pinMode(in4, OUTPUT);
- }
- void loop() {
- if(flag){
- digitalWrite(in1, HIGH);
- digitalWrite(in2, LOW);
- digitalWrite(in3, LOW);
- digitalWrite(in4, HIGH);
- }
- delay(4000);
- digitalWrite(in1, LOW);
- digitalWrite(in2, LOW);
- digitalWrite(in3, LOW);
- digitalWrite(in4, LOW);
- flag = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement