![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Dependencies: BurstSPI EaEpaper TFT_fonts mbed
Fork of epaper_mbed_test by
Revision 2:03336b128c50, committed 2015-04-23
- Comitter:
- Starz
- Date:
- Thu Apr 23 06:34:46 2015 +0000
- Parent:
- 1:5ba919589a12
- Commit message:
- for valentinooo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Nov 10 22:27:53 2013 +0000 +++ b/main.cpp Thu Apr 23 06:34:46 2015 +0000 @@ -4,6 +4,7 @@ #include "Arial12x12.h" #include "font_big.h" #include "graphics.h" +#include <string> EaEpaper epaper(p9, // PWR_CTRL p10, // BORDER @@ -15,26 +16,34 @@ p5,p6,p7, // MOSI,MISO,SCLK p28,p27); // SDA,SCL +Serial rs232(p13,p14); +Serial pc(USBTX, USBRX); // tx, rx +DigitalOut myled(LED1); +string cmd =""; int main() { - - epaper.cls(); + + /* epaper.cls(); + epaper.setmode(1); epaper.set_font((unsigned char*) Arial28x28); // select the font epaper.locate(5,20); - epaper.printf("Hello Mbed"); + + epaper.printf("Hello"); epaper.rect(3,15,150,50,1); - - epaper.set_font((unsigned char*) Arial12x12); - epaper.locate(5,60); - epaper.printf("small Font"); - epaper.set_font((unsigned char*) Neu42x35); - epaper.locate(5,70); - epaper.printf("big Font"); - epaper.write_disp(); // update screen - - wait(5); - epaper.fillcircle(180,30,22,1); - epaper.circle(160,150,20,1); - epaper.write_disp(); // update screen + epaper.setmode(1); + epaper.circle(180,30,22,1); + epaper.write_disp(); // update screen*/ + pc.printf("Hello, i'm mbed !!!\r\n"); + rs232.baud(115200); + while (true) + { + if (rs232.readable()) + { + myled = !myled; + cmd = rs232.getc(); + pc.printf("%s\r\n",cmd); + + } + } }