Simple fish eat program
Dependencies: mbed mbed-rtos N5110 ShiftReg Tone
Diff: main.cpp
- Revision:
- 1:7dfa61225fcf
- Parent:
- 0:cf9660998431
- Child:
- 2:532b0225519f
--- a/main.cpp Fri Mar 19 16:27:52 2021 +0000 +++ b/main.cpp Fri Mar 19 17:28:12 2021 +0000 @@ -1,32 +1,20 @@ #include "mbed.h" -#include "N5110.h" -#include "Graphics.h" +#include "FishEngine.h" N5110 lcd(p8,p9,p10,p11,p13,p21); -Graphics graphics; +Tone dac(p18); + +FishEngine fish; -DigitalIn button_A (p29); +BusOut leds(LED4,LED3,LED2,LED1); + +void system_init(); int main(){ - lcd.init(); - button_A.mode(PullNone); + fish.system_init(lcd,dac); while(1){ - lcd.clear(); - graphics.titleScreen(lcd); - lcd.refresh(); - wait_ms(1000/10); - - while(button_A.read() == 0){ - lcd.clear(); - graphics.confirmationScreen(lcd); - lcd.refresh(); - wait_ms(1000/10); - } - - graphics.screenFlash(lcd); - lcd.refresh(); + fish.titleSequence(lcd); + wait_ms(1000); } - - } \ No newline at end of file