-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgostopp.ino
More file actions
54 lines (43 loc) · 804 Bytes
/
gostopp.ino
File metadata and controls
54 lines (43 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <LiquidCrystal_I2C.h>
int totalColumns = 16;
int totalRows = 2;
LiquidCrystal_I2C lcd(0x3F, totalColumns, totalRows);
const int go_but = 2;
const int stopp_but = 3;
int state_go = 0;
int state_stopp = 0;
int gotrue = false;
byte go[8] = {
0b00100,
0b00100,
0b01110,
0b10101,
0b10100,
0b00110,
0b01001,
0b10001,
};
byte stopp[8] = {
0b00010,
0b00111,
0b00111,
0b10111,
0b10111,
0b11111,
0b11111,
0b01110,
};
void setup() {
lcd.init();
lcd.backlight(); // use to turn on and turn off LCD back light
lcd.createChar(0, go);
lcd.createChar(1, stopp);
pinMode(go_but, INPUT);
pinMode(stopp_but, INPUT);
}
void loop() {
while (true) {
lcd.setCursor(0,0);
lcd.write(0);
}
}