Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int idx = 1;
- void timed_action() {
- switch(idx){
- case 1: //turn on one led
- idx++;
- break;
- case 2: //turn on two leds
- idx++;
- break;
- case 3: //turn on three leds
- idx++;
- break;
- case 4: //turn on four leds
- idx++;
- break;
- case 5: //no changes
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment