c++ - Code debugging error Arduino -
i facing 2 errors below program:
- on serial monitor not printing in
main()
. - when enter
lcd_call()
function. if key being pressed goes next case. per program should stay in same window going case 1.
void setup() { serial.begin(9600); } void loop() { serial.println("in main"); lcd_call(); } void lcd_call() { int menuoption=0; int button; { switch(menuoption) { case 0: serial.println("set+date:"); display_date_time(); timedbeep(shortbeep,1); break; case 1: serial.println("display:"); lcdclear(); lcd.print("display menu"); timedbeep(shortbeep,1); break; case 2: serial.println("set menu:"); lcdclear(); lcd.print("set menu"); timedbeep(shortbeep,1); break; } button=read_lcd_buttons(); if(button==btnright) { menuoption=menuoption+1; if(menuoption>2) { menuoption=0; } } else { menuoption; } } while(menuoption<menuoptions); }
Comments
Post a Comment