My project is an adjustable Voltage Sensing Relay working injunction with an LCD and buttons (the cheap copy of DFROBOT Shield).
I have 4 menus:
1: Home > (voltage1 , voltage2 , current) // displays the voltage1, voltage2 and current
2: Resting Voltage> (*********) // Enter the “Resting Voltage” menu and it displays the
//restingVoltage and has an option to change the value
3: Running Voltage > (*********) // Enter the " Running Voltage " menu and it displays the
//runningVoltage and has an option to change the value
4: Off Voltage > (*********) //Enter the “Off Voltage” menu and it displays the offVoltage
//and has an option to change it
The problem is when I’m in Menu 2 ( or any other menu) and try to print the value of “voltage1” it errors and says “it’s not declared in the scope”
My question is How can I make my code common to all the other menus?
I’ve attached my code, if you think you’re able to help I would hugely appreciate it.
Final_Stage_VSR_Menu_Continued.ino (14.3 KB)