Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void stop(){
- while(digitalRead(2) != HIGH){
- delay(10);
- }
- while(digitalRead(2) == HIGH){
- delay(10);
- }
- }
- void setup(){
- pinMode ( 2, INPUT);
- pinMode ( 8, OUTPUT);
- pinMode ( 9, OUTPUT);
- pinMode ( 10, OUTPUT);
- pinMode ( 11, OUTPUT);
- pinMode ( 12, OUTPUT);
- }
- void loop() {
- stop();
- digitalWrite ( 8, HIGH);
- digitalWrite ( 9, LOW);
- digitalWrite ( 10, HIGH);
- digitalWrite ( 11, LOW);
- digitalWrite ( 12, LOW);
- stop();
- digitalWrite ( 8, LOW);
- digitalWrite ( 9, HIGH);
- stop();
- digitalWrite ( 9, LOW);
- digitalWrite ( 8, HIGH);
- digitalWrite ( 10, HIGH);
- stop();
- digitalWrite ( 11, HIGH);
- stop();
- digitalWrite ( 10, LOW);
- digitalWrite ( 11, LOW);
- digitalWrite ( 12, HIGH);
- stop();
- digitalWrite ( 12, LOW);
- digitalWrite ( 11, HIGH);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement