Código para o menu no LCD
Dependencies: mbed SDFileSystemSD TextLCD
Fork of TextLCD_HelloWorld2 by
Diff: classes.h
- Revision:
- 43:4684aba69ba6
- Parent:
- 42:48096cfdea78
- Child:
- 44:15968c7431c6
diff -r 48096cfdea78 -r 4684aba69ba6 classes.h --- a/classes.h Sun Jun 10 21:52:12 2018 +0000 +++ b/classes.h Mon Jun 11 20:09:48 2018 +0000 @@ -785,7 +785,7 @@ movercursor(3,3,8); if (bot_enter!=penter){ if (linha==3){ - printf("vai home\n\r"); + //printf("vai home\n\r"); home = 1; func = 27; } @@ -798,7 +798,9 @@ lcd.cls(); lcd.locate(0,0); lcd.printf("Modo WiFi Ativo"); - movercursor(3,3,0); + movercursor(3,3,5); + lcd.locate(6,3); + lcd.printf("Cancelar"); } //func 14 @@ -1195,6 +1197,19 @@ wait(1); func = 4; } + + //func 31 + void tela_emergencia(void){ + + lcd.cls(); + lcd.locate(0,1); + lcd.printf("BOTAO DE EMERGENCIA"); + lcd.locate(4,2); + lcd.printf("PRESSIONADO."); + printf("Waiting release..."); + func = 1; + while(!emergencia.read()); + } //função ler arquivos @@ -1343,14 +1358,8 @@ } } } - void tela_emergencia(void){ - lcd.cls(); - lcd.printf("EMERGENCIA"); - printf("Waiting release..."); - func = 1; - while(!emergencia.read()); - } + //função para ler os pontos void readSerial(){ @@ -1451,6 +1460,12 @@ break; } } + t1.reset(); + t1.start(); + tempo = 2; + if (t1.read()>tempo){ + break; + } } }