Overall state machine
Main ServiceThe main service handles the overall game timer (<2 minutes), and tells other services when to celebrate and reset.
|
Events Service ConfigureEvent Service Configure is the header file for the software framework used to control our program.
|
Flipbook Services
Flipbook services control the animation for each flipbook.
Flipbook1Service |
Flipbook2Service |
Flipbook3Service |
Helper Services
AirServiceThis service posts ES_AIR events when the user waves his/her hand across the tape sensors to signal harvesting.
|
WaterBuckerServiceThis service posts ES_WATER events with the accelerometer's (water bucket) tilt as a parameter.
|
FruitDispenseServiceThis service takes care of the fruit dispenser motor that releases an apple once the user is done harvesting.
|
LEDsServiceThis service takes care of all the LEDs functionality (one on each flipbook, on seed, and on the water bucket.
|
Switch Services
Switches were used to know the beginning and end of each animation, to know position of the fruit dispenser spindle, and to know when a seed was planted by the user. Each switch service takes care of debouncing and posting to the appropriste services.
SeedService |
Flipbook1Switch |
Flipbook2Switch |
Flipbook3Switch |
FruitSwitch |