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.
main.cpp
- Committer:
- thestudent
- Date:
- 2020-04-23
- Revision:
- 12:f7dfd44569b6
- Parent:
- 11:4722bf70b2be
- Child:
- 13:1dbef50789ed
File content as of revision 12:f7dfd44569b6:
/* ELEC2645 Embedded Systems Project School of Electronic & Electrical Engineering University of Leeds 2019/20 Name:Arturs Kolovskis Username:el18ak Student ID Number: 201253737 Date:08.03.2020 */ // includes #include "mbed.h" #include "Gamepad.h" #include "N5110.h" #include "Objects.h" #include "Functions.h" // objects Gamepad pad; N5110 lcd; Objects objects; Functions functions; //functions void initialise(); //variables bool game_check = false; int main() { initialise(); while(game_check == false) { lcd.clear(); objects.draw_base(lcd); objects.cannon_position(pad); objects.draw_cannon(lcd); functions.ball_position_linear(lcd,objects,3); game_check = functions.cannon_smash(lcd, objects); objects.draw_shots(lcd); functions.collision_checker(lcd,objects); lcd.refresh(); wait(0.05); lcd.clear(); objects.cannon_position(pad); objects.draw_cannon(lcd); lcd.refresh(); wait(0.005); } printf("bool is: true "); } void initialise() { pad.init();//initialises the gamepad lcd.init();//initialises the N5100 screen lcd.clear(); }