First

Dependencies:   UniGraphic mbed

Committer:
asloop18
Date:
Thu Jan 14 22:52:20 2016 +0000
Revision:
6:459d1eb2cc23
Parent:
2:a88824178246
working game; mission accomplished

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pstephens18 1:65ea8c2a0551 1 #include "LCD1.h"
pstephens18 0:f17efa877b15 2 #include "stdio.h"
pstephens18 0:f17efa877b15 3 #include "string"
pstephens18 0:f17efa877b15 4 #include "ILI932x.h"
pstephens18 0:f17efa877b15 5
pstephens18 0:f17efa877b15 6 #include "Arial12x12.h"
pstephens18 0:f17efa877b15 7 #include "Arial24x23.h"
pstephens18 0:f17efa877b15 8 #include "pavement_48x34.h"
pstephens18 0:f17efa877b15 9
asloop18 6:459d1eb2cc23 10 //Serial pc(USBTX, USBRX);
pstephens18 0:f17efa877b15 11
pstephens18 0:f17efa877b15 12 PinName dataBus[]= {p30, p29, p28, p27, p26, p25, p24, p23};
pstephens18 0:f17efa877b15 13 ILI932x myLCD(BUS_8, dataBus, p15, p17, p16, p14, p20, "myLCD", 240, 320); // Bus 8 bit, bus pin array, CS, RST, DC, WR, RD, name, xpixels, ypixels
pstephens18 0:f17efa877b15 14
pstephens18 0:f17efa877b15 15 char orient=3;
pstephens18 0:f17efa877b15 16
pstephens18 0:f17efa877b15 17 int pos1=160;
pstephens18 0:f17efa877b15 18 int pos2=120;
pstephens18 0:f17efa877b15 19 int direction1= 0;
pstephens18 0:f17efa877b15 20 int direction2= 0;
pstephens18 0:f17efa877b15 21
pstephens18 0:f17efa877b15 22 void LCD_init()
pstephens18 0:f17efa877b15 23 {
pstephens18 0:f17efa877b15 24 myLCD.set_orientation(orient);
pstephens18 1:65ea8c2a0551 25 myLCD.background(Black);
asloop18 6:459d1eb2cc23 26 myLCD.cls();
pstephens18 0:f17efa877b15 27 }
pstephens18 0:f17efa877b15 28
pstephens18 1:65ea8c2a0551 29 void LCD1(int x,int y)
pstephens18 0:f17efa877b15 30 {
asloop18 6:459d1eb2cc23 31 myLCD.fillcircle(x,y,6,Black);
asloop18 6:459d1eb2cc23 32 }
asloop18 6:459d1eb2cc23 33
asloop18 6:459d1eb2cc23 34 void LCD2(int x,int y)
asloop18 6:459d1eb2cc23 35 {
asloop18 6:459d1eb2cc23 36 myLCD.fillcircle(x,y,6,Red);
asloop18 6:459d1eb2cc23 37 myLCD.circle(160,120,12,White);
pstephens18 2:a88824178246 38 }