.

Dependencies:   BurstSPI EaEpaper mbed

Fork of epaper_mbed_130411_KL25Z by Peter Drescher

Committer:
dreschpe
Date:
Sun Nov 10 22:27:53 2013 +0000
Revision:
1:5ba919589a12
Parent:
0:057244fcbbb6
Child:
3:6ab30c065d39
Test program for E-Paper display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dreschpe 0:057244fcbbb6 1 #include "mbed.h"
dreschpe 0:057244fcbbb6 2 #include "EaEpaper.h"
dreschpe 0:057244fcbbb6 3 #include "Arial28x28.h"
dreschpe 0:057244fcbbb6 4 #include "Arial12x12.h"
dreschpe 0:057244fcbbb6 5 #include "font_big.h"
dreschpe 0:057244fcbbb6 6 #include "graphics.h"
dreschpe 0:057244fcbbb6 7
dreschpe 1:5ba919589a12 8 EaEpaper epaper(p9, // PWR_CTRL
dreschpe 1:5ba919589a12 9 p10, // BORDER
dreschpe 1:5ba919589a12 10 p11, // DISCHARGE
dreschpe 1:5ba919589a12 11 p12, // RESET_DISP
dreschpe 1:5ba919589a12 12 p13, // BUSY
dreschpe 1:5ba919589a12 13 p8, // SSEL
dreschpe 1:5ba919589a12 14 p26, // PWM
dreschpe 1:5ba919589a12 15 p5,p6,p7, // MOSI,MISO,SCLK
dreschpe 1:5ba919589a12 16 p28,p27); // SDA,SCL
dreschpe 0:057244fcbbb6 17
dreschpe 0:057244fcbbb6 18 int main() {
dreschpe 0:057244fcbbb6 19
dreschpe 0:057244fcbbb6 20 epaper.cls();
dreschpe 0:057244fcbbb6 21 epaper.set_font((unsigned char*) Arial28x28); // select the font
dreschpe 0:057244fcbbb6 22 epaper.locate(5,20);
dreschpe 0:057244fcbbb6 23 epaper.printf("Hello Mbed");
dreschpe 0:057244fcbbb6 24 epaper.rect(3,15,150,50,1);
dreschpe 0:057244fcbbb6 25
dreschpe 0:057244fcbbb6 26 epaper.set_font((unsigned char*) Arial12x12);
dreschpe 0:057244fcbbb6 27 epaper.locate(5,60);
dreschpe 0:057244fcbbb6 28 epaper.printf("small Font");
dreschpe 0:057244fcbbb6 29 epaper.set_font((unsigned char*) Neu42x35);
dreschpe 0:057244fcbbb6 30 epaper.locate(5,70);
dreschpe 0:057244fcbbb6 31 epaper.printf("big Font");
dreschpe 0:057244fcbbb6 32
dreschpe 0:057244fcbbb6 33 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 34
dreschpe 0:057244fcbbb6 35 wait(5);
dreschpe 0:057244fcbbb6 36 epaper.fillcircle(180,30,22,1);
dreschpe 0:057244fcbbb6 37 epaper.circle(160,150,20,1);
dreschpe 0:057244fcbbb6 38 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 39
dreschpe 0:057244fcbbb6 40 }