Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char d1 '0'; //the tens place.
- char d2 '0'; //the ones place.
- void loop (){
- d2 ++; //increase the ones place by one.
- if (d2 > '9'){ //if the ones place is greater than '9'...
- d1 ++; //increase the tens place by one...
- d2 = '0'; //set the ones place to '0'.
- }
- if (d1 > '9'){ //if the tens place is greater than '9'...
- d1 = '0'; //set the tens place to '0'...
- d2 = '0'; //set the ones place to '0'.
- }
- disp (d1,false,d2,false); //send the two digits to the display function.
- delay(1000); //wait a second.
- }
Advertisement
Add Comment
Please, Sign In to add comment