Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
- //LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
- int a = 0;
- int b = 0;
- int c = 0;
- int d= 0;
- int e = 0;
- int f = 0;
- void setup(){
- delay(1000);
- lcd.begin(16, 2);
- lcd.print("zegareczek");
- }
- void loop() {
- lcd.setCursor(0,2);
- lcd.print(f);
- lcd.print(e);
- lcd.print(":");
- lcd.print(d);
- lcd.print(c);
- lcd.print(":");
- lcd.print(b);
- lcd.print(a);
- lcd.setCursor(0,2);
- delay(1000);
- a=a+1;
- if (a >9){
- a = 0;
- b = b + 1;
- }
- if (b> 9){
- b= 0;
- c= c + 1;
- }
- if (c >9) {
- c = 0;
- d = d+1;
- }
- if (d>9) {
- d = 0;
- e = e+1;
- }
- if (e>4) {
- e= 0;
- f= f+1;
- }
- if (f>2) {
- f=0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement