Dependencies:   BurstSPI EaEpaper TFT_fonts mbed

Fork of epaper_mbed_test 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 #include <string>
00008 
00009 EaEpaper epaper(p9,             // PWR_CTRL
00010                 p10,            // BORDER
00011                 p11,            // DISCHARGE
00012                 p12,            // RESET_DISP
00013                 p13,            // BUSY
00014                 p8,             // SSEL
00015                 p26,            // PWM
00016                 p5,p6,p7,       // MOSI,MISO,SCLK
00017                 p28,p27);       // SDA,SCL 
00018  
00019 Serial  rs232(p13,p14);
00020 Serial pc(USBTX, USBRX); // tx, rx
00021 DigitalOut myled(LED1);
00022 string cmd ="";
00023 int main() {
00024      
00025   /*  epaper.cls();
00026     epaper.setmode(1);
00027     epaper.set_font((unsigned char*) Arial28x28);  // select the font
00028     epaper.locate(5,20);
00029     
00030     epaper.printf("Hello");
00031     epaper.rect(3,15,150,50,1);
00032     
00033     epaper.setmode(1); 
00034     epaper.circle(180,30,22,1);
00035     epaper.write_disp(); // update screen*/
00036     pc.printf("Hello, i'm mbed !!!\r\n");
00037     rs232.baud(115200);
00038     while (true)
00039      {
00040          if (rs232.readable())
00041          {
00042                       myled = !myled;
00043                       cmd = rs232.getc();
00044                       pc.printf("%s\r\n",cmd);
00045              
00046              }
00047          }
00048    
00049 }