Skip to content

Commit 9c4e867

Browse files
committed
Update 1602_keypad_shield.ino
1 parent f1bf7a4 commit 9c4e867

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

1602_keypad_shield.ino

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// Initialize the library with the numbers of the interface pins
66
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
77

8-
#define BACKLIGHT 10
9-
108
// initialize a few values
119
int last_panel = 0;
1210
int press_count = 0;
@@ -196,10 +194,12 @@ void requested_temperature(int lcd_key) {
196194

197195
void mode(int lcd_key) {
198196

199-
//sysem_mode
197+
//example system_mode value from eeprom
198+
//system_mode = 2;
200199

201200
lcd.print("Mode: ");
202201

202+
// press_count used for cycling through values below
203203
press_count++;
204204
lcd.setCursor(6,0);
205205
switch (press_count % 3) {
@@ -209,7 +209,7 @@ void mode(int lcd_key) {
209209
break;
210210
case 1:
211211
lcd.print("Cool");
212-
system_mode = 1;
212+
system_mode = 1;
213213
break;
214214
case 2:
215215
lcd.print("Heat");
@@ -227,7 +227,7 @@ void mode(int lcd_key) {
227227
void fan(int lcd_key) {
228228

229229
//example fan_mode value from eeprom
230-
//fan_mode = 1
230+
//fan_mode = 1;
231231

232232
lcd.print("Fan: ");
233233

@@ -245,6 +245,8 @@ void fan(int lcd_key) {
245245
break;
246246
}
247247

248+
Serial.println(press_count);
249+
248250
// whene select button pressed, we save the data to eeprom and print SAVED to lcd
249251
if (lcd_key == 4) {
250252
lcd.clear();

0 commit comments

Comments
 (0)