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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "EaEpaper.h"
00003 #include "Arial28x28.h"
00004 #include "Arial12x12.h"
00005 #include "font_big.h"
00006 
00007 EaEpaper epaper(p17,          // PWR_CTRL
00008                 p9,           // BORDER
00009                 p18,          // DISCHARGE
00010                 p38,          // RESET_DISP
00011                 p10,          // BUSY
00012                 p14,          // SSEL
00013                 p37,          // PWM
00014                 p11,p12,p13,  // MOSI,MISO,SCLK
00015                 p19,p20);     // SDA,SDL 
00016 
00017 int main() {
00018 
00019     epaper.cls();
00020     
00021     epaper.set_font((unsigned char*) Arial28x28);  // select the font
00022     epaper.locate(5,20);
00023     epaper.printf("Hello Mbed");
00024     
00025     epaper.rect(3,15,150,50,1);
00026      
00027     epaper.set_font((unsigned char*) Arial12x12);
00028     epaper.locate(5,60);
00029     epaper.printf("small Font");
00030     epaper.set_font((unsigned char*) Neu42x35);
00031     epaper.locate(5,70);
00032     epaper.printf("big Font");
00033     
00034     epaper.write_disp(); // update screen
00035     
00036     wait(5);
00037     epaper.fillcircle(180,30,22,1);
00038     epaper.circle(160,150,20,1);
00039     
00040     epaper.write_disp(); // update screen    
00041 
00042     return 0;    
00043 }