test de premier push

Dependencies:   WakeUp mbed EPD_GDE021A1

Revision:
17:3f52db5f8b42
Child:
22:cbc76ab6a864
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sources/refreshScreen.cpp	Fri Nov 11 17:42:54 2016 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+#include "EPD_GDE021A1.h"
+#include "../Headers/refreshScreen.h"
+
+#define EPD_CS       PA_15
+#define EPD_DC       PB_11
+#define EPD_RESET    PB_2
+#define EPD_BUSY     PA_8
+#define EPD_POWER    PB_10
+#define EPD_SPI_MOSI PB_5
+#define EPD_SPI_MISO PB_4
+#define EPD_SPI_SCK  PB_3
+
+EPD_GDE021A1 epd(EPD_CS, EPD_DC, EPD_RESET, EPD_BUSY, EPD_POWER, EPD_SPI_MOSI, EPD_SPI_MISO, EPD_SPI_SCK);//Parametre l'ecrant E-Ink
+
+void refreshScreen()
+{
+    
+    
+    char ligne1[100];
+    char ligne2[100];
+    char ligne3[100];
+    char ligne4[100];
+    char ligne5[100];
+    double poidsRuche;
+    double temperatureRuche;
+    double humiditeRuche;
+    
+    poidsRuche = 48.26;
+    temperatureRuche = 12.34;
+    humiditeRuche = 52.47;
+    
+    sprintf (ligne1, "La ruche pese actuelement %3fKg",poidsRuche);  
+    sprintf (ligne2, "La temperature est de %3f C",temperatureRuche);  
+    sprintf (ligne3, "L'humidite est de %3f %",humiditeRuche);  
+    sprintf (ligne4, "et la");  
+    sprintf (ligne5, "on met autre chose");  
+
+    
+    epd.Clear(EPD_COLOR_WHITE);  
+
+    epd.DisplayStringAtLine(5, (uint8_t*)ligne1, CENTER_MODE);
+    epd.DisplayStringAtLine(4, (uint8_t*)ligne2, CENTER_MODE);
+    epd.DisplayStringAtLine(3, (uint8_t*)ligne3, CENTER_MODE);
+    epd.DisplayStringAtLine(2, (uint8_t*)ligne4, CENTER_MODE);
+    epd.DisplayStringAtLine(1, (uint8_t*)ligne5, CENTER_MODE);
+    
+    
+    epd.RefreshDisplay();
+
+}
\ No newline at end of file