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
- Committer:
- S_Tingle
- Date:
- 2019-03-25
- Revision:
- 2:2cc42dea101c
- Parent:
- 1:dc1b2f4b72be
- Child:
- 3:72e0f4d267ed
File content as of revision 2:2cc42dea101c:
/*
ELEC2645 Embedded Systems Project
School of Electronic & Electrical Engineering
University of Leeds
Name: Spencer Tingle
Username: el17set
Student ID Number: 201147893
Date: 25/03/2019
*/
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "Smiley.h"
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
Gamepad pad;
Smiley smiley;
void init();
void start();
void render();
int main(){
init();
lcd.setContrast(0.4);
lcd.setBrightness(0.5);
start();
render();
while (1) {
render();
}
}
void init(){
lcd.init();
pad.init();
}
void render(){
lcd.clear();
smiley.drawSprite(lcd);
lcd.refresh();
wait(0.1);
}
void start(){
lcd.printString(" | Smiley Adventures | ",0,1);
lcd.printString(" Press Start to Begin ",0,4);
lcd.refresh();
}