Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- int wait = 200; //replace with timer inturrupt??
- //if button is pressed 'return'
- if (player1==HIGH)
- {
- //cycle through leds
- //digitalread after each delay
- }
- //Do this eventually
- while (digitalRead(player1) == HIGH)
- //if (digitalRead(player1) == HIGH)
- {
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 127);
- digitalWrite(latch2, HIGH);
- delay(wait); //replace with timer inturrupt??
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 191);
- digitalWrite(latch2, HIGH);
- delay(wait);
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 199);
- digitalWrite(latch2, HIGH);
- delay(wait);
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 249);
- digitalWrite(latch2, HIGH);
- delay(wait);
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 254);
- digitalWrite(latch2, HIGH);
- delay(wait);
- }
- int i;
- //for (i=0;i<1000;i++)
- //{
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 255);
- digitalWrite(latch2, HIGH);
- delay(300);
- //}
- hey(); //replace with return? So we can exit the function?
- }
- void hey() //turns on all LEDs
- { int i;
- for (i=0;i<1000;i++)
- {
- digitalWrite(latch2, LOW);
- shiftOut(data2, clock2, MSBFIRST, 0);
- digitalWrite(latch2, HIGH);
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement