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.
Diff: main.cpp
- Revision:
- 6:33bdb54c2c88
- Parent:
- 5:8e3d6cbc8b02
- Child:
- 7:82079de8bcd6
diff -r 8e3d6cbc8b02 -r 33bdb54c2c88 main.cpp --- a/main.cpp Tue Mar 24 15:21:56 2020 +0000 +++ b/main.cpp Wed Apr 01 11:20:24 2020 +0000 @@ -1,4 +1,4 @@ -/* +/* ELEC2645 Embedded Systems Project School of Electronic & Electrical Engineering University of Leeds @@ -15,12 +15,14 @@ #include "Gamepad.h" #include "N5110.h" #include "Objects.h" +#include "Functions.h" // objects Gamepad pad; N5110 lcd; Objects objects; +Functions functions; //functions void initialise(); @@ -29,21 +31,23 @@ { initialise(); - while(1){ - lcd.clear(); - objects.draw_base(lcd); - objects.draw_cannon(lcd); - objects.cannon_position(pad); - objects.draw_shots(lcd); - lcd.refresh(); - wait(0.5); - + while(1) { + lcd.clear(); + objects.draw_base(lcd); + objects.draw_cannon(lcd); + objects.cannon_position(pad); + objects.draw_shots(lcd); + functions.ball_position(lcd, objects); + lcd.refresh(); + wait(0.2); + } } -void initialise(){ +void initialise() +{ pad.init();//initialises the gamepad lcd.init();//initialises the N5100 screen - + }