ELEC2645 (2018/19) / Mbed 2 deprecated EL17MCD

Dependencies:   mbed

main.cpp

Committer:
el17mcd
Date:
2019-04-02
Revision:
3:087b28bf8b96
Parent:
2:8382613c86a0
Child:
4:3b3a7f102250

File content as of revision 3:087b28bf8b96:

/*
ELEC2645 Embedded Systems Project
School of Electronic & Electrical Engineering
University of Leeds
Name: Maxim C. Delacoe
Username: EL 17 MCD
Student ID Number: 2011 58344
Date: 19/03/2019
*/
///////// pre-processor directives ////////
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "Bitmap.h"

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

const int tank_left[6][10] =   {
    { 0,0,0,1,1,1,0,0,0,0 },
    { 0,0,1,1,1,1,1,0,0,0 },
    { 0,0,1,1,1,1,1,1,1,0 },
    { 1,1,1,1,1,1,1,1,1,1 },
    { 1,0,1,0,1,0,1,0,1,0 },
    { 0,1,0,1,0,1,0,1,0,0 },                                                                
};

void welcome()
{
    lcd.clear();
    lcd.printString("  ELEC 2645",0,0);
    lcd.printString("  Game  ",0,1);
    lcd.printString("   Project",0,2);
    lcd.printString("Max C. Delacoe",0,4);
    lcd.printString(" 2011 58344",0,5);
    lcd.refresh();
    wait(0.2);
}

int main()
{
  int pos_x = rand() % 84;
  
    lcd.init();
   // welcome();  // display welcome message 

    while(1) {  // infinite loop
    
    lcd.clear();
  //  lcd.drawSprite(0,48-6,6,10,(int *)tank_left);
    lcd.refresh();
    wait_ms(250);
    } */
}