k

Dependencies:   EPD_GDE021A1 mbed

Fork of DISCO-L053C8_ePD_demo by Aleksandr Ushanov

Files at this revision

API Documentation at this revision

Comitter:
meta1
Date:
Thu Jun 01 15:20:03 2017 +0000
Parent:
0:306e008a65d3
Commit message:
dasdad

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Jun 01 12:33:16 2017 +0000
+++ b/main.cpp	Thu Jun 01 15:20:03 2017 +0000
@@ -13,7 +13,7 @@
 EPD_GDE021A1 epd(EPD_CS, EPD_DC, EPD_RESET, EPD_BUSY, EPD_POWER, EPD_SPI_MOSI, EPD_SPI_MISO, EPD_SPI_SCK);
 
 DigitalOut led1(LED1);
-
+AnalogIn temperature(A0);
 //width 48
 //height 26
 static uint8_t Battery_img[] = {
@@ -48,7 +48,8 @@
 int main()
 {
     led1 = 1;
-    
+    char tmpTemp[15] = "test";
+    epd.SetFont(&Font20);
     epd.Clear(EPD_COLOR_WHITE);  
 //    epd.DisplayStringAtLine(5, (uint8_t*)"HUEMBED", CENTER_MODE);
 //    epd.DisplayStringAtLine(2, (uint8_t*)"demo", LEFT_MODE);
@@ -56,12 +57,17 @@
 //    epd.DrawRect(50, 4, 60, 4);
 //    epd.RefreshDisplay();
     wait(2);
-uint8_t i = 30;
+    float i = 10.3;
     while(1) {
+        
         led1 = !led1;
         epd.Clear(EPD_COLOR_WHITE); 
-        epd.DisplayStringAtLine(5, (uint8_t*)"HUEMBED", CENTER_MODE); 
-        epd.DisplayStringAtLine(3, (uint8_t*)i, CENTER_MODE);
+        sprintf(tmpTemp, "P = %.1f", temperature.read()); 
+        epd.DisplayStringAtLine(0, (uint8_t*)tmpTemp, LEFT_MODE);
+        epd.DisplayStringAtLine(1, (uint8_t*)"0.5      1.0", LEFT_MODE);
+        epd.DisplayStringAtLine(2, (uint8_t*)"IDLE", LEFT_MODE);
+        //epd.DrawImage(130, 0, 48, 26, Battery_img);
+        //epd.DisplayChar(1, 3, (uint8_t*)"HUEMBED");
         epd.RefreshDisplay();
         i++;
         wait(2);