Ivan
|
 |
« on: December 05, 2010, 02:42:28 AM » |
|
KenB et al,
I've got myself a 328Atmega duemilanove with the nuelectronics nokia 3310 display and the realtime clock/SD card shield.
I've downloaded the nokia display library,but am struggling to understand how to create menu systems. I've attached my slightly modified version of the demo sketch provided in the nuelectronics download. (Both the .h and .pde files have been renamed to .txt so that they can be uploaded to the forum)
Can anyone help me produce the menu system described below:
*************************************** Main Page
LINE 1: [The current Time from realtime clock] LINE 2: "Mst Vnt Lit Ht" LINE 3: OFF OFF OFF ON (ie status of relays 1 - 4) Line 4: "Temp. Humidty" Line 5: 21C 95% (ie reading of temperature sensor; reading of humidity sensor)
(Click any button to exit main page and enter Top menu system)
***************************** TOP MENU PAGE (user can scroll through menu, selected title is highlighted. Click centre key on joystick to reach required submenu)
LINE 1:SET MIST LINE 2:SET Ventilation LINE 3:SET Temperature LINE 4:SET Light
Exits to main page after 30seconds without keystroke
****************************** SET MIST PAGE
LINE 1: 'SET MISTING' Line 2: "On Time" (using the joystick left/right buttons, toggles Variable[vent] through 0.25, 0.5, 1, 2, 3, 4, 5, 10, 15, 20) Line 3: [mist] 'min' Line 4: 'No.of Cycles/hr' LINE 5: [cyc] times (using the joystick left/right buttons, toggle between 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
Line 6: OK (If clicked, returns user to Top Menu Page)
nb variable [cyc] can be changed within the MIST or VENT pages ******************************* SET VENT PAGE (the joystick up/down key toggles between highlighting line3, line5 and line6) LINE 1: 'SET VENTILATION' LINE 2: 'Vent On Time' Line 3: [vent] 'min' (using the joystick left/right buttons, toggles Variable[vent] through 0.25, 0.5, 1, 2, 3, 4, 5) Line 4: 'No.of Cycles/hr' LINE 5: [cyc] times (using the joystick left/right buttons, toggle between 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
Line 6: OK (If clicked, returns user to Top Menu Page) ********************************
SET TEMP PAGE
LINE 1: 'SET TEMPERATURE' Line 2: 'Min. Temp' Line 3: [Tmin] C (using the joystick left/right buttons, toggles Variable[TminC] through 0 - 30C) Line 4: 'Max. Temp' Line 5: [Tmax] C (using the joystick left/right buttons, toggles Variable[TminC] through 0 - 30C, maintaining at least 1C hysteresis above [Tmin])
Line 6: OK (If clicked, returns user to Top Menu Page) ******************************** SET Light PAGE
LINE 1: 'Set Diurnal period' Line 2: [diurnal] 'hrs' (using the joystick left/right buttons, toggles Variable[diurnal] through 20,21,22,23,24,25,26,27,28 ) Line 4: 'SET daylength' Line 5: [day] hrs (using the joystick left/right buttons, toggles Variable[day] through 8,9,10,11,12,13,14,15,16,17,18)
Line 6: OK (If clicked, returns user to Top Menu Page) ********************************
|