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.
Dependencies: mbed ELEC2645_Project_el18to
main.cpp@3:793a6186b557, 2020-04-08 (annotated)
- Committer:
- Tolu__
- Date:
- Wed Apr 08 11:35:58 2020 +0000
- Revision:
- 3:793a6186b557
- Parent:
- 2:4b2c00ba7f7c
- Child:
- 4:536a62daa959
f
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| eencae | 0:b7f1f47bb26a | 1 | /* |
| eencae | 0:b7f1f47bb26a | 2 | ELEC2645 Embedded Systems Project |
| eencae | 0:b7f1f47bb26a | 3 | School of Electronic & Electrical Engineering |
| eencae | 0:b7f1f47bb26a | 4 | University of Leeds |
| eencae | 0:b7f1f47bb26a | 5 | 2019/20 |
| eencae | 0:b7f1f47bb26a | 6 | |
| Tolu__ | 1:356eeff7b566 | 7 | Name: Toluwalakin |
| Tolu__ | 1:356eeff7b566 | 8 | Username: Owoso |
| Tolu__ | 1:356eeff7b566 | 9 | Student ID Number: 201231164 |
| Tolu__ | 1:356eeff7b566 | 10 | Date: 01/04/2020 |
| eencae | 0:b7f1f47bb26a | 11 | */ |
| eencae | 0:b7f1f47bb26a | 12 | |
| eencae | 0:b7f1f47bb26a | 13 | // includes |
| eencae | 0:b7f1f47bb26a | 14 | #include "mbed.h" |
| eencae | 0:b7f1f47bb26a | 15 | #include "Gamepad.h" |
| eencae | 0:b7f1f47bb26a | 16 | #include "N5110.h" |
| Tolu__ | 3:793a6186b557 | 17 | #include "CCar.h" |
| Tolu__ | 3:793a6186b557 | 18 | #include "GameEngine.h" |
| eencae | 0:b7f1f47bb26a | 19 | |
| eencae | 0:b7f1f47bb26a | 20 | |
| eencae | 0:b7f1f47bb26a | 21 | Gamepad pad; |
| eencae | 0:b7f1f47bb26a | 22 | N5110 lcd; |
| Tolu__ | 3:793a6186b557 | 23 | CCar user; |
| Tolu__ | 3:793a6186b557 | 24 | GameEngine game; |
| eencae | 0:b7f1f47bb26a | 25 | |
| Tolu__ | 2:4b2c00ba7f7c | 26 | |
| Tolu__ | 3:793a6186b557 | 27 | int main(){ |
| Tolu__ | 3:793a6186b557 | 28 | pad.init(); |
| Tolu__ | 3:793a6186b557 | 29 | lcd.init(); |
| Tolu__ | 3:793a6186b557 | 30 | pad.leds_on(); |
| Tolu__ | 3:793a6186b557 | 31 | int i = 1; |
| Tolu__ | 3:793a6186b557 | 32 | while(1){ |
| Tolu__ | 3:793a6186b557 | 33 | lcd.clear(); |
| Tolu__ | 3:793a6186b557 | 34 | game.run(lcd, pad, user); |
| Tolu__ | 3:793a6186b557 | 35 | //printf("i = %i\n",i); |
| Tolu__ | 3:793a6186b557 | 36 | i++; |
| Tolu__ | 3:793a6186b557 | 37 | lcd.refresh(); |
| Tolu__ | 3:793a6186b557 | 38 | wait_ms(10); |
| Tolu__ | 3:793a6186b557 | 39 | } |
| Tolu__ | 3:793a6186b557 | 40 | } |