Test program for E.Paper display for LPC1768

Dependencies:   BurstSPI EaEpaper TFT_fonts mbed

Fork of epaper_mbed_130411_KL25Z by Peter Drescher

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 #include "graphics.h"
00007 
00008 EaEpaper epaper(p9,             // PWR_CTRL
00009                 p10,            // BORDER
00010                 p11,            // DISCHARGE
00011                 p12,            // RESET_DISP
00012                 p13,            // BUSY
00013                 p8,             // SSEL
00014                 p26,            // PWM
00015                 p5,p6,p7,       // MOSI,MISO,SCLK
00016                 p28,p27);       // SDA,SCL 
00017  
00018 int main() {
00019 
00020     epaper.cls();
00021     epaper.set_font((unsigned char*) Arial28x28);  // select the font
00022     epaper.locate(5,20);
00023     epaper.printf("Hello Mbed");
00024     epaper.rect(3,15,150,50,1);
00025      
00026     epaper.set_font((unsigned char*) Arial12x12);
00027     epaper.locate(5,60);
00028     epaper.printf("small Font");
00029     epaper.set_font((unsigned char*) Neu42x35);
00030     epaper.locate(5,70);
00031     epaper.printf("big Font");
00032     
00033     epaper.write_disp(); // update screen
00034     
00035     wait(5);
00036     epaper.fillcircle(180,30,22,1);
00037     epaper.circle(160,150,20,1);
00038     epaper.write_disp(); // update screen
00039    
00040 }