Preston Stephens
/
Mini_Project_Day_8_Level
First
LCD1.cpp@1:65ea8c2a0551, 2016-01-14 (annotated)
- Committer:
- pstephens18
- Date:
- Thu Jan 14 21:19:52 2016 +0000
- Revision:
- 1:65ea8c2a0551
- Parent:
- LCD.cpp@0:f17efa877b15
- Child:
- 2:a88824178246
2
;
Who changed what in which revision?
User | Revision | Line number | New 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 | |
pstephens18 | 0:f17efa877b15 | 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 | int x,y; |
pstephens18 | 0:f17efa877b15 | 17 | |
pstephens18 | 0:f17efa877b15 | 18 | int pos1=160; |
pstephens18 | 0:f17efa877b15 | 19 | int pos2=120; |
pstephens18 | 0:f17efa877b15 | 20 | int direction1= 0; |
pstephens18 | 0:f17efa877b15 | 21 | int direction2= 0; |
pstephens18 | 0:f17efa877b15 | 22 | |
pstephens18 | 0:f17efa877b15 | 23 | void LCD_init() |
pstephens18 | 0:f17efa877b15 | 24 | { |
pstephens18 | 0:f17efa877b15 | 25 | myLCD.set_orientation(orient); |
pstephens18 | 1:65ea8c2a0551 | 26 | myLCD.background(Black); |
pstephens18 | 0:f17efa877b15 | 27 | myLCD.cls(); |
pstephens18 | 0:f17efa877b15 | 28 | } |
pstephens18 | 0:f17efa877b15 | 29 | |
pstephens18 | 1:65ea8c2a0551 | 30 | void LCD1(int x,int y) |
pstephens18 | 0:f17efa877b15 | 31 | { |
pstephens18 | 0:f17efa877b15 | 32 | myLCD.cls(); |
pstephens18 | 1:65ea8c2a0551 | 33 | myLCD.circle(120,160,12,White); |
pstephens18 | 1:65ea8c2a0551 | 34 | myLCD.fillcircle(x,y,6,Red); |
pstephens18 | 1:65ea8c2a0551 | 35 | } |