Código para o menu no LCD
Dependencies: mbed SDFileSystemSD TextLCD
Fork of TextLCD_HelloWorld2 by
Diff: classes.h
- Revision:
- 37:30f7dd6f2ea5
- Parent:
- 36:12d202855231
- Child:
- 38:6c94230e5ecd
--- a/classes.h Tue May 29 16:37:48 2018 +0000 +++ b/classes.h Wed May 30 15:58:38 2018 +0000 @@ -837,7 +837,7 @@ sair = 0; bot_enter = penter; voltar = 0; - lcd.locate(1,0); + lcd.locate(2,0); lcd.printf("Escolha o nome:"); lcd.locate(0,3); lcd.printf("Segure OK p/ salvar"); @@ -1000,7 +1000,7 @@ void salvando_arq(){ lcd.locate(5,1); lcd.printf("Salvando"); - lcd.locate(5,2); + lcd.locate(1,2); lcd.printf("%s", nome); wait(1); func = 7; @@ -1011,7 +1011,7 @@ lcd.cls(); bot_enter = penter; lcd.locate(2,0); - lcd.printf("DESEJA EXECUTAR"); + lcd.printf("DESEJA EXECUTAR?"); lcd.locate(3,1); lcd.printf("%s", arquivo); lcd.locate(6,2); @@ -1215,12 +1215,11 @@ } } - if (coluna<=18){ + if (nome.size()<14 && coluna<=14){ char carac = alfabeto[i]; nome.push_back(carac); - //printf("Nome do programa (func - escrever): %s\n\r", nome); bot_enter = penter; - if (coluna<18){ + if (coluna<=14){ if (voltar==1){ //printf("voltar\n\r"); if (coluna>1){ @@ -1235,7 +1234,7 @@ lcd.printf("%c", 0x5E); } } - if (voltar==0){ + if (voltar==0 && coluna<14){ lcd.locate(coluna, 2); lcd.printf(" "); coluna++; @@ -1243,10 +1242,6 @@ lcd.printf("%c", 0x5E); } } - /*char carac = alfabeto[i]; - nome.push_back(carac); - printf("%s\n\r", nome); - bot_enter = penter;*/ } } }