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
main.cpp@1:3183193cf44e, 2019-03-31 (annotated)
- Committer:
- batJoro
- Date:
- Sun Mar 31 22:49:44 2019 +0000
- Revision:
- 1:3183193cf44e
- Parent:
- 0:a0dedca5e89f
- Child:
- 3:f686f6d7bdff
day 1 evening Started the first menu
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| batJoro | 0:a0dedca5e89f | 1 | |
| batJoro | 0:a0dedca5e89f | 2 | #include "mbed.h" |
| batJoro | 1:3183193cf44e | 3 | #include "Gamepad.h" |
| batJoro | 1:3183193cf44e | 4 | #include "N5110.h" |
| batJoro | 1:3183193cf44e | 5 | #include "menu.h" |
| batJoro | 1:3183193cf44e | 6 | |
| batJoro | 0:a0dedca5e89f | 7 | |
| batJoro | 0:a0dedca5e89f | 8 | /* |
| batJoro | 0:a0dedca5e89f | 9 | ELEC2645 Embedded Systems Project |
| batJoro | 0:a0dedca5e89f | 10 | School of Electronic & Electrical Engineering University of Leeds |
| batJoro | 0:a0dedca5e89f | 11 | |
| batJoro | 0:a0dedca5e89f | 12 | Name: Dobri Tsvetkov |
| batJoro | 0:a0dedca5e89f | 13 | Username: el17dtt |
| batJoro | 0:a0dedca5e89f | 14 | Student ID Number: 201154059 |
| batJoro | 0:a0dedca5e89f | 15 | Date: 12.03.2019 |
| batJoro | 0:a0dedca5e89f | 16 | */ |
| batJoro | 0:a0dedca5e89f | 17 | |
| batJoro | 1:3183193cf44e | 18 | // consytucting the gamepad |
| batJoro | 1:3183193cf44e | 19 | Gamepad gamepad; |
| batJoro | 1:3183193cf44e | 20 | |
| batJoro | 1:3183193cf44e | 21 | // constructing the lcd |
| batJoro | 1:3183193cf44e | 22 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
| batJoro | 0:a0dedca5e89f | 23 | |
| batJoro | 0:a0dedca5e89f | 24 | int main() { |
| batJoro | 1:3183193cf44e | 25 | // initialize the gamepad |
| batJoro | 1:3183193cf44e | 26 | gamepad.init(); |
| batJoro | 1:3183193cf44e | 27 | gamepad.leds_on(); |
| batJoro | 0:a0dedca5e89f | 28 | |
| batJoro | 1:3183193cf44e | 29 | // initialize the lcd |
| batJoro | 1:3183193cf44e | 30 | lcd.init(); |
| batJoro | 1:3183193cf44e | 31 | lcd.setContrast(0.4); |
| batJoro | 1:3183193cf44e | 32 | |
| batJoro | 1:3183193cf44e | 33 | while(true) { |
| batJoro | 1:3183193cf44e | 34 | // refresh the screen |
| batJoro | 1:3183193cf44e | 35 | lcd.clear(); |
| batJoro | 1:3183193cf44e | 36 | |
| batJoro | 1:3183193cf44e | 37 | // draw the big circle |
| batJoro | 1:3183193cf44e | 38 | //lcd.drawCircle(42,64,35,FILL_TRANSPARENT); |
| batJoro | 1:3183193cf44e | 39 | Menu menu; |
| batJoro | 1:3183193cf44e | 40 | menu.startMainMenu(lcd); |
| batJoro | 1:3183193cf44e | 41 | |
| batJoro | 1:3183193cf44e | 42 | // lcd.drawLine(11, 47, 74, 45, 1); |
| batJoro | 1:3183193cf44e | 43 | lcd.refresh(); |
| batJoro | 1:3183193cf44e | 44 | |
| batJoro | 1:3183193cf44e | 45 | } |
| batJoro | 0:a0dedca5e89f | 46 | } |