An example that shows how to use the Embedded Artists E-paper display. This example is using the EaEpaper library originally developed by Peter Drescher

Dependencies:   EaEpaper TFT_fonts mbed

The 2.7 inch E-paper display module connected to the LPC4088 QSB Base Board.

/media/uploads/embeddedartists/qsb_lpc4088_bb_w_epaper_250.png

Committer:
embeddedartists
Date:
Wed Dec 04 12:55:39 2013 +0000
Revision:
0:7ae28af60a9a
First commit

Who changed what in which revision?

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