Andreas Garmannslund / Mbed 2 deprecated SimplePlatformGame

Dependencies:   N5110 PinDetect PowerControl mbed

Embed: (wiki syntax)

« Back to documentation index

main.cpp File Reference

main.cpp File Reference

Simple platform game developed for ELEC2645 Embedded Systems Project at University of Leeds. More...

Go to the source code of this file.

Functions

AnalogIn ledPot (LED_POT)
 Brightness potentiometer.
void init ()
 Set up initial variables.
void cleanUp ()
 Frees remaining allocated memory.
LocalFileSystem local ("local")
 Local file system.
unsigned int getRandSeed ()
 Function for generating a random seed by using a unconnected analog input pin.
void readHighscoreFile ()
 Read and load the high score file.

Variables

N5110 * lcd
 Display.
Soundsound
 Sound: Piezo buzzer.
InputManagerinput
 Responsible for managing user input.
StateManagerfsm
 Finite state machine.

Detailed Description

Simple platform game developed for ELEC2645 Embedded Systems Project at University of Leeds.

Author:
Andreas Garmannslund
Date:
April/May 2015

Definition in file main.cpp.


Function Documentation

void cleanUp (  )

Frees remaining allocated memory.

Definition at line 153 of file main.cpp.

unsigned int getRandSeed (  )

Function for generating a random seed by using a unconnected analog input pin.

Get a random seed based on unconnected analog input pins.

See also:
https://developer.mbed.org/questions/2886/Why-is-the-rand-function-not-the-least-b/

Definition at line 163 of file main.cpp.

void init (  )

Set up initial variables.

Definition at line 104 of file main.cpp.

AnalogIn ledPot ( LED_POT   )

Brightness potentiometer.

LocalFileSystem local ( "local"   )

Local file system.

void readHighscoreFile (  )

Read and load the high score file.

Definition at line 129 of file main.cpp.


Variable Documentation

Finite state machine.

Definition at line 57 of file main.cpp.

Responsible for managing user input.

Definition at line 42 of file main.cpp.

N5110* lcd

Display.

Definition at line 36 of file main.cpp.

Sound: Piezo buzzer.

Definition at line 39 of file main.cpp.