Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@1:99d524f81566, 2019-04-02 (annotated)
- Committer:
- JamesCummins
- Date:
- Tue Apr 02 20:31:10 2019 +0000
- Revision:
- 1:99d524f81566
- Parent:
- 0:7c96d84b673e
- Child:
- 3:f2e5ffd2b94c
Start Menu errors fixed
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JamesCummins | 0:7c96d84b673e | 1 | /* |
JamesCummins | 0:7c96d84b673e | 2 | ELEC2645 Embedded Systems Project |
JamesCummins | 0:7c96d84b673e | 3 | School of Electronic & Electrical Engineering |
JamesCummins | 0:7c96d84b673e | 4 | University of Leeds |
JamesCummins | 0:7c96d84b673e | 5 | Name: James Nathan Cummins |
JamesCummins | 0:7c96d84b673e | 6 | Username: el17jnc |
JamesCummins | 0:7c96d84b673e | 7 | Student ID Number: 201096364 |
JamesCummins | 0:7c96d84b673e | 8 | Date: 22/03/19 |
JamesCummins | 0:7c96d84b673e | 9 | */ |
JamesCummins | 0:7c96d84b673e | 10 | |
JamesCummins | 0:7c96d84b673e | 11 | #include "Gamepad.h" |
JamesCummins | 0:7c96d84b673e | 12 | #include "mbed.h" |
JamesCummins | 1:99d524f81566 | 13 | #include "N5110.h" |
JamesCummins | 0:7c96d84b673e | 14 | |
JamesCummins | 0:7c96d84b673e | 15 | Gamepad gamepad(); |
JamesCummins | 0:7c96d84b673e | 16 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
JamesCummins | 1:99d524f81566 | 17 | void startmenu(); |
JamesCummins | 0:7c96d84b673e | 18 | |
JamesCummins | 0:7c96d84b673e | 19 | int main(){ |
JamesCummins | 1:99d524f81566 | 20 | /*gamepad.init();*/ |
JamesCummins | 0:7c96d84b673e | 21 | lcd.init(); |
JamesCummins | 1:99d524f81566 | 22 | startmenu(); |
JamesCummins | 0:7c96d84b673e | 23 | } |
JamesCummins | 0:7c96d84b673e | 24 | |
JamesCummins | 1:99d524f81566 | 25 | void startmenu() { |
JamesCummins | 1:99d524f81566 | 26 | lcd.clear(); |
JamesCummins | 1:99d524f81566 | 27 | char gamename[] = {'L', 'A', 'B', 'Y', 'R', 'I', 'N', 'T', 'H', '\0'}; |
JamesCummins | 1:99d524f81566 | 28 | for (int i = 0; i < 9; i++) { |
JamesCummins | 1:99d524f81566 | 29 | |
JamesCummins | 1:99d524f81566 | 30 | lcd.printChar(gamename[i], i*6, 0); |
JamesCummins | 1:99d524f81566 | 31 | lcd.refresh(); |
JamesCummins | 1:99d524f81566 | 32 | wait(0.2); |
JamesCummins | 1:99d524f81566 | 33 | } |
JamesCummins | 0:7c96d84b673e | 34 | } |