ELEC2645 (2018/19) / Mbed 2 deprecated el17dtt

Dependencies:   mbed

main.cpp

Committer:
batJoro
Date:
2019-03-31
Revision:
1:3183193cf44e
Parent:
0:a0dedca5e89f
Child:
3:f686f6d7bdff

File content as of revision 1:3183193cf44e:


#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "menu.h"


/*
ELEC2645 Embedded Systems Project
School of Electronic & Electrical Engineering University of Leeds

Name: Dobri Tsvetkov
Username: el17dtt
Student ID Number: 201154059
Date: 12.03.2019
*/

// consytucting the gamepad
Gamepad gamepad;

// constructing the lcd 
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);

int main() {
    // initialize the gamepad
    gamepad.init();
    gamepad.leds_on();
    
    // initialize the lcd
    lcd.init();
    lcd.setContrast(0.4);
    
    while(true) {
           // refresh the screen
            lcd.clear();
            
            // draw the big circle
            //lcd.drawCircle(42,64,35,FILL_TRANSPARENT);
            Menu menu;
            menu.startMainMenu(lcd);
            
            // lcd.drawLine(11, 47, 74, 45, 1);
            lcd.refresh();
            
    }
}