Minigame based on Nucleo F103RBSTM32F103RBT6 microcontroller with mBed Application shield
Dependencies: C12832 LM75B MMA7660 mbed
Fork of apps-shield-pots by
- One player - Apple to collect - Monster to avoid - 3 life - 5 ammo - Dynamic difficulty
Playability : Move with accelerometer Shoot with joystick Notifications with RBG LED/Speaker
4 applicatives view - Menu - Ingame - Pause (press fire 2 seconds) - Game over
Have fun
main.cpp@4:f0eb984c583d, 2014-08-01 (annotated)
- Committer:
- chris
- Date:
- Fri Aug 01 14:32:40 2014 +0000
- Revision:
- 4:f0eb984c583d
- Parent:
- 3:100dbea70564
- Child:
- 5:f11bddc1baf0
Updated mbed library version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris | 0:cca95aa94e09 | 1 | #include "mbed.h" |
chris | 2:989f84939300 | 2 | #include "C12832.h" |
chris | 0:cca95aa94e09 | 3 | |
chris | 4:f0eb984c583d | 4 | C12832 lcd(D11, D13, D12, D7, D10); |
chris | 1:e50da1f1f653 | 5 | |
chris | 3:100dbea70564 | 6 | AnalogIn pot1 (A0); |
chris | 3:100dbea70564 | 7 | AnalogIn pot2 (A1); |
chris | 0:cca95aa94e09 | 8 | |
chris | 0:cca95aa94e09 | 9 | int main() |
chris | 0:cca95aa94e09 | 10 | { |
chris | 0:cca95aa94e09 | 11 | while(1) { |
chris | 1:e50da1f1f653 | 12 | lcd.cls(); |
chris | 1:e50da1f1f653 | 13 | lcd.locate(0,3); |
chris | 3:100dbea70564 | 14 | lcd.printf("Pot 1 = %.2f", (float)pot1); |
chris | 3:100dbea70564 | 15 | lcd.locate(0,14); |
chris | 3:100dbea70564 | 16 | lcd.printf("Pot 2 = %.2f", (float)pot2); |
chris | 3:100dbea70564 | 17 | wait(0.1); |
chris | 0:cca95aa94e09 | 18 | } |
chris | 0:cca95aa94e09 | 19 | } |