Chapter 10: C Structures
ay be scrolling the LCD with your name. Then
to keep some sort
puts and what
oing A_state and
A_input happens, then I enter Q7_state
ppens, then I enter YM_state
ppens, then I enter X15_state
t happens, then I enter Mental_state
se if B_input happens, then I enter A_state
ut happens, then I enter Y_state
input happens, then I enter Pros_state
else if C_input happens, then I enter Gamma_state
n do this like:
on the LCD and
is clicked left, then I enter the Revision state
ime state
left, then I enter the Clock state
else if the joystick is clicked down, then I enter the Music state
on
and
At one moment the Butterfly m
you click the joystick down and it shows you the time. It needs
of data set that contains what it is doing now and how to react to in
to do next based on what is doing now.
We can think about input stimulated state transitions like this:
If I am d
if
else if B_input ha
else if C_input ha
// and so on
else if XXX_inpu
If I am doing B_state and
if A_input happens, then I enter B_state
el
else if Cinp
// and so on
and XXX
// and so on
If I am doing XXX_state and
if A_input happens, then I enter Alpha_state
else if B_input happens, then I enter Beta_state
// and so on
else if XXX_input happens, then I enter Tennessee_state
From the Butterfly menu we see that we ca
If I am showing “AVR Butterfly”
if the joystick
else if the joystick is clicked down, then I enter the T
If I am showing the “Time” on the LCD and
if the joystick is clicked
// and so
If I am showing “Options” on the LCD