Test program for the E-Paper display
Dependencies: BurstSPI EaEpaper TFT_fonts mbed
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(PTD7, // PWR_CTRL 00009 PTD6, // BORDER 00010 PTE31, // DISCHARGE 00011 PTA17, // RESET_DISP 00012 PTA16, // BUSY 00013 PTC17, // SSEL 00014 PTD4, // PWM 00015 PTD2,PTD3,PTD1, // MOSI,MISO,SCLK 00016 PTE0,PTE1); // SDA,SDL 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 }
Generated on Mon Jul 18 2022 01:58:18 by 1.7.2