ECE 4180 Final
Dependencies: mbed wave_player mbed-rtos C12832_lcd 4DGL-uLCD-SE LCD_fonts SDFileSystem
Revision 3:431877852f14, committed 2019-12-04
- Comitter:
- yqin70
- Date:
- Wed Dec 04 18:09:19 2019 +0000
- Parent:
- 2:765774781bb1
- Commit message:
- w/ songs
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 765774781bb1 -r 431877852f14 main.cpp --- a/main.cpp Tue Dec 03 22:57:12 2019 +0000 +++ b/main.cpp Wed Dec 04 18:09:19 2019 +0000 @@ -176,8 +176,262 @@ int main() { - //doesnt work yet, need to ask hamblen - + //timestamp in terms of seconds + int the_middle[62][5] = {2, 0, 1, 0, 0, + 3, 0, 1, 0, 0, + 4, 0, 1, 0, 0, + 5, 0, 1, 0, 0, + 6, 0, 0, 1, 0, + 7, 0, 0, 1, 0, + 8, 0, 0, 1, 0, + 9, 0, 0, 1, 0, + 10, 0, 0, 1, 0, + 11, 0, 0, 0, 1, + 12, 0, 0, 0, 1, + 13, 0, 0, 0, 1, + 15, 0, 0, 1, 1, + 16, 0, 0, 1, 1, + 17, 0, 0, 1, 1, + 18, 0, 1, 1, 0, + 19, 0, 1, 1, 0, + 20, 0, 1, 1, 0, + 21, 0, 1, 1, 0, + 22, 0, 1, 1, 0, + 23, 0, 1, 1, 0, + 24, 0, 1, 1, 0, + 25, 0, 1, 1, 0, + 27, 0, 1, 0, 0, + 28, 0, 1, 0, 0, + 29, 0, 1, 0, 0, + 30, 0, 1, 0, 0, + 31, 0, 0, 1, 0, + 32, 0, 0, 1, 0, + 33, 0, 0, 1, 0, + 34, 0, 0, 1, 0, + 35, 0, 0, 1, 0, + 36, 0, 0, 1, 0, + 37, 0, 0, 0, 1, + 38, 0, 0, 0, 1, + 39, 0, 0, 0, 1, + 40, 0, 0, 0, 1, + 42, 0, 1, 1, 0, + 43, 0, 0, 1, 1, + 44, 0, 1, 1, 0, + 45, 0, 0, 1, 1, + 46, 0, 1, 1, 0, + 47, 0, 0, 1, 1, + 48, 0, 1, 1, 0, + 49, 0, 0, 1, 1, + 51, 0, 1, 1, 1, + 52, 0, 1, 1, 1, + 53, 0, 1, 1, 1, + 54, 0, 1, 1, 1, + 56, 0, 1, 0, 0, + 57, 0, 1, 0, 0, + 58, 0, 1, 0, 0, + 59, 0, 1, 0, 0, + 61, 0, 0, 1, 0, + 62, 0, 1, 1, 1, + 63, 0, 1, 1, 1, + 64, 0, 1, 1, 1, + 66, 0, 1, 1, 0, + 67, 0, 0, 1, 1, + 68, 0, 1, 1, 0, + 69, 0, 0, 1, 1, + 70, 0, 1, 1, 0}; + + int stacys_mom[70][5] = {1, 0, 1, 0, 0, + 2, 0, 1, 0, 0, + 3, 0, 1, 1, 0, + 4, 0, 1, 0, 0, + 5, 0, 1, 0, 0, + 6, 0, 1, 1, 0, + 8, 0, 0, 1, 0, + 9, 0, 0, 0, 1, + 10, 0, 1, 0, 0, + 11, 0, 0, 1, 0, + 12, 0, 1, 1, 0, + 13, 0, 1, 1, 0, + 15, 0, 0, 1, 1, + 16, 0, 0, 1, 1, + 17, 0, 0, 1, 1, + 18, 0, 0, 1, 1, + 20, 0, 1, 0, 0, + 21, 0, 0, 1, 0, + 22, 0, 0, 0, 1, + 24, 0, 0, 1, 1, + 25, 0, 0, 1, 1, + 26, 0, 0, 1, 0, + 27, 0, 0, 1, 0, + 28, 0, 0, 0, 1, + 29, 0, 1, 0, 0, + 31, 0, 1, 1, 1, + 32, 0, 1, 0, 1, + 33, 0, 1, 0, 1, + 34, 0, 1, 0, 1, + 35, 0, 1, 0, 1, + 36, 0, 1, 0, 1, + 37, 0, 1, 0, 1, + 39, 0, 0, 1, 0, + 40, 0, 0, 1, 0, + 41, 0, 0, 1, 0, + 42, 0, 0, 1, 0, + 43, 0, 0, 0, 1, + 44, 0, 0, 0, 1, + 45, 0, 0, 1, 0, + 46, 0, 0, 1, 0, + 47, 0, 0, 1, 1, + 48, 0, 0, 1, 1, + 49, 0, 0, 1, 1, + 51, 0, 1, 0, 0, + 52, 0, 0, 1, 0, + 53, 0, 0, 0, 1, + 54, 0, 0, 1, 1, + 55, 0, 0, 1, 1, + 56, 0, 0, 1, 0, + 57, 0, 0, 1, 0, + 58, 0, 0, 1, 0, + 59, 0, 0, 1, 0, + 60, 0, 0, 1, 0, + 61, 0, 0, 1, 0, + 62, 0, 0, 1, 0, + 64, 0, 1, 0, 0, + 65, 0, 1, 0, 0, + 66, 0, 1, 0, 0, + 67, 0, 1, 0, 0, + 68, 0, 1, 0, 0, + 69, 0, 1, 0, 0, + 70, 0, 1, 0, 0, + 73, 0, 0, 1, 1, + 74, 0, 0, 1, 1, + 75, 0, 1, 0, 0, + 76, 0, 0, 1, 0, + 77, 0, 0, 0, 1, + 78, 0, 1, 0, 0, + 79, 0, 0, 1, 0, + 80, 0, 0, 0, 1}; + + int sins[60][5] = {2, 0, 1, 0, 0, + 3, 0, 0, 1, 0, + 4, 0, 1, 0, 0, + 5, 0, 0, 1, 0, + 6, 0, 0, 0, 1, + 7, 0, 1, 0, 0, + 8, 0, 0, 0, 1, + 9, 0, 1, 0, 0, + 10, 0, 0, 0, 1, + 11, 0, 1, 1, 1, + 13, 0, 1, 0, 0, + 14, 0, 0, 1, 0, + 15, 0, 1, 0, 0, + 16, 0, 0, 1, 0, + 17, 0, 0, 1, 0, + 18, 0, 0, 1, 0, + 19, 0, 0, 1, 0, + 20, 0, 0, 1, 0, + 22, 0, 0, 0, 1, + 23, 0, 0, 1, 1, + 24, 0, 0, 0, 1, + 25, 0, 0, 1, 1, + 26, 0, 0, 0, 1, + 27, 0, 0, 1, 1, + 28, 0, 1, 0, 0, + 29, 0, 1, 1, 0, + 30, 0, 1, 0, 0, + 31, 0, 1, 1, 0, + 33, 0, 1, 0, 0, + 34, 0, 1, 0, 0, + 35, 0, 1, 0, 0, + 36, 0, 0, 1, 1, + 37, 0, 0, 1, 1, + 38, 0, 0, 1, 1, + 39, 0, 0, 1, 1, + 40, 0, 0, 1, 1, + 42, 0, 1, 1, 0, + 43, 0, 1, 1, 0, + 44, 0, 0, 1, 0, + 45, 0, 0, 1, 1, + 46, 0, 0, 1, 1, + 47, 0, 0, 1, 1, + 48, 0, 0, 1, 1, + 49, 0, 0, 1, 1, + 50, 0, 0, 1, 0, + 51, 0, 1, 1, 0, + 52, 0, 1, 1, 0, + 53, 0, 1, 1, 0, + 54, 0, 1, 1, 0, + 55, 0, 1, 1, 0, + 56, 0, 1, 0, 0, + 57, 0, 0, 1, 0, + 58, 0, 1, 0, 0, + 59, 0, 0, 1, 0, + 60, 0, 1, 0, 0, + 62, 0, 1, 1, 0, + 63, 0, 1, 1, 0, + 64, 0, 1, 1, 0, + 65, 0, 1, 1, 0, + 66, 0, 1, 1, 0}; + + int fireflies[58][5] = { + 1, 0, 1, 0, 0, + 2, 0, 0, 1, 0, + 3, 0, 1, 0, 0, + 4, 0, 0, 1, 0, + 5, 0, 1, 0, 0, + 6, 0, 0, 1, 0, + 7, 0, 1, 0, 0, + 8, 0, 0, 1, 0, + 9, 0, 1, 0, 0, + 10, 0, 0, 1, 0, + 11, 0, 0, 0, 1, + 12, 0, 0, 1, 0, + 13, 0, 1, 0, 0, + 14, 0, 0, 1, 0, + 15, 0, 0, 0, 1, + 16, 0, 1, 1, 0, + 17, 0, 1, 1, 0, + 18, 0, 0, 1, 1, + 19, 0, 0, 1, 1, + 21, 0, 0, 1, 0, + 22, 0, 0, 1, 0, + 23, 0, 0, 1, 0, + 24, 0, 0, 1, 0, + 25, 0, 1, 0, 0, + 26, 0, 1, 0, 0, + 27, 0, 0, 1, 0, + 28, 0, 0, 1, 0, + 29, 0, 0, 0, 1, + 30, 0, 0, 0, 1, + 32, 0, 1, 0, 0, + 33, 0, 1, 0, 0, + 34, 0, 0, 1, 0, + 35, 0, 0, 1, 0, + 36, 0, 0, 0, 1, + 37, 0, 0, 0, 1, + 38, 0, 0, 1, 0, + 39, 0, 0, 1, 0, + 40, 0, 1, 0, 0, + 41, 0, 1, 0, 0, + 43, 0, 1, 1, 1, + 44, 0, 1, 1, 1, + 45, 0, 1, 1, 1, + 46, 0, 1, 1, 1, + 47, 0, 1, 1, 0, + 48, 0, 1, 1, 0, + 49, 0, 0, 1, 1, + 50, 0, 0, 1, 1, + 51, 0, 0, 1, 1, + 53, 0, 1, 1, 0, + 54, 0, 1, 1, 0, + 55, 0, 0, 1, 1, + 56, 0, 1, 1, 0, + 57, 0, 0, 1, 1, + 59, 0, 1, 0, 0, + 60, 0, 0, 1, 0, + 61, 0, 0, 0, 1, + 62, 0, 0, 1, 0, + 63, 0, 1, 0, 0}; + //doesnt work yet, nee,d to ask hamblen uLCD.media_init(); uLCD.set_sector_address(0x001D, 0x4C01); uLCD.display_image(0,0);