January
2006, Issue 186
Electronic
Scarecrow
MENU
SYSTEM
The
Electronic Scarecrow features a user-friendly menu system,
which is a table-driven state machine consisting of
LCD prompts and actions that enable you to control everything
via three push buttons. The menu-processing routine
is called from the main loop once every 1 s or whenever
you press a button. The menu table contains the text
for each menu state, the routines, and the next states
after you press the Menu and Select buttons.
The
Exit button always returns to the top menu state. From
this state, the Menu button steps through each of the
primary menus. Pressing the Select button drops you
down one level or increments a displayed parameter if
you’re already at the lowest level.