.

Dependencies:   BurstSPI EaEpaper mbed

Fork of epaper_mbed_130411_KL25Z by Peter Drescher

Committer:
dreschpe
Date:
Sun Nov 10 22:32:17 2013 +0000
Revision:
2:e1e4e20e6b26
Parent:
0:057244fcbbb6
add doc

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 0:057244fcbbb6 8 EaEpaper epaper(PTD7, // PWR_CTRL
dreschpe 0:057244fcbbb6 9 PTD6, // BORDER
dreschpe 0:057244fcbbb6 10 PTE31, // DISCHARGE
dreschpe 0:057244fcbbb6 11 PTA17, // RESET_DISP
dreschpe 0:057244fcbbb6 12 PTA16, // BUSY
dreschpe 0:057244fcbbb6 13 PTC17, // SSEL
dreschpe 0:057244fcbbb6 14 PTD4, // PWM
dreschpe 0:057244fcbbb6 15 PTD2,PTD3,PTD1, // MOSI,MISO,SCLK
dreschpe 0:057244fcbbb6 16 PTE0,PTE1); // SDA,SDL
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 2:e1e4e20e6b26 22 epaper.locate(5,20); // setup cursor
dreschpe 2:e1e4e20e6b26 23 epaper.printf("Hello Mbed"); // print text
dreschpe 2:e1e4e20e6b26 24 epaper.rect(3,15,150,50,1); // draw frame
dreschpe 0:057244fcbbb6 25
dreschpe 2:e1e4e20e6b26 26 epaper.set_font((unsigned char*) Arial12x12); // load font
dreschpe 2:e1e4e20e6b26 27 epaper.locate(5,60); // setup cursor
dreschpe 2:e1e4e20e6b26 28 epaper.printf("small Font"); // print text
dreschpe 2:e1e4e20e6b26 29 epaper.set_font((unsigned char*) Neu42x35); // load font
dreschpe 2:e1e4e20e6b26 30 epaper.locate(5,70); // setup cursor
dreschpe 2:e1e4e20e6b26 31 epaper.printf("big Font"); // print text
dreschpe 0:057244fcbbb6 32
dreschpe 2:e1e4e20e6b26 33 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 34
dreschpe 2:e1e4e20e6b26 35 wait(5); // wait 5s
dreschpe 2:e1e4e20e6b26 36 epaper.fillcircle(180,30,22,1); // paint filled circle
dreschpe 2:e1e4e20e6b26 37 epaper.circle(160,150,20,1); // paint circle
dreschpe 2:e1e4e20e6b26 38 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 39
dreschpe 0:057244fcbbb6 40 }