klavesnice pro unikovku
[mirrors/Programs.git] / arduino / exit-rum-display / exit-rum-display.ino
1 #include <Wire.h>
2 #include <LiquidCrystal_I2C.h>
3 #include <TM1637Display.h>
4
5 // Module connection pins (Digital Pins)
6 #define CLK 2
7 #define DIO 3
8
9 TM1637Display display(CLK, DIO);
10
11 // Set the LCD address to 0x27 for a 16 chars and 2 line display
12 LiquidCrystal_I2C lcd(0x3F, 16, 2);
13
14 int i;
15
16 void setup()
17 {
18 // initialize the LCD
19 lcd.begin();
20
21 // Turn on the blacklight and print a message.
22 lcd.backlight();
23 lcd.print("Rychta pyco!");
24
25 display.setBrightness(0x0f);
26 display.setColon(true);
27 display.showNumberDec(23);
28
29 pinMode(8, OUTPUT);
30 pinMode(9, OUTPUT);
31
32 }
33
34 void loop()
35 {
36 digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level)
37 display.setColon(true);
38 display.showNumberDec(i);
39 delay(1000);
40 digitalWrite(8, LOW); // turn the LED off by making the voltage LOW
41 display.setColon(false);
42 display.showNumberDec(i++);
43 delay(1000);
44 }
This page took 0.457498 seconds and 4 git commands to generate.