Simple fish eat program

Dependencies:   mbed mbed-rtos N5110 ShiftReg Tone

Committer:
el18a2k
Date:
Thu Mar 25 11:31:57 2021 +0000
Revision:
6:7aafcaf7cbe2
Parent:
4:db929dab4f13
Child:
7:6f951d175df6
restructured (implement sound on/off)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el18a2k 0:cf9660998431 1 #include "mbed.h"
el18a2k 3:8c9c9794bcf2 2 #include "rtos.h" //allows multiple threads to run at the same time: https://os.mbed.com/handbook/RTOS
el18a2k 3:8c9c9794bcf2 3
el18a2k 1:7dfa61225fcf 4 #include "FishEngine.h"
el18a2k 6:7aafcaf7cbe2 5 #include "Settings.h"
el18a2k 0:cf9660998431 6
el18a2k 3:8c9c9794bcf2 7 /*TO DO:
el18a2k 6:7aafcaf7cbe2 8 * REMEMBER TO USE VERSION CONTROL
el18a2k 6:7aafcaf7cbe2 9 * implement sound on/off */
el18a2k 3:8c9c9794bcf2 10
el18a2k 3:8c9c9794bcf2 11 //Attach
el18a2k 0:cf9660998431 12 N5110 lcd(p8,p9,p10,p11,p13,p21);
el18a2k 2:532b0225519f 13 Joystick joystick(p20, p19);
el18a2k 1:7dfa61225fcf 14 Tone dac(p18);
el18a2k 1:7dfa61225fcf 15
el18a2k 2:532b0225519f 16 //Objects
el18a2k 1:7dfa61225fcf 17 FishEngine fish;
el18a2k 6:7aafcaf7cbe2 18 Settings settingsMain;
el18a2k 0:cf9660998431 19
el18a2k 0:cf9660998431 20 int main(){
el18a2k 6:7aafcaf7cbe2 21 settingsMain.systemINIT( lcd, dac, joystick); //initialise board
el18a2k 0:cf9660998431 22
el18a2k 0:cf9660998431 23 while(1){
el18a2k 2:532b0225519f 24 fish.titleSequence(lcd); //calls title sequence
el18a2k 2:532b0225519f 25 fish.mainMenu(lcd, dac, joystick);
el18a2k 0:cf9660998431 26 }
el18a2k 0:cf9660998431 27 }