test de premier push

Dependencies:   WakeUp mbed EPD_GDE021A1

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ecran.cpp Source File

ecran.cpp

00001 /*#include "../Headers/ecran.h"
00002 
00003 #define EPD_CS       PA_15
00004 #define EPD_DC       PB_11
00005 #define EPD_RESET    PB_2
00006 #define EPD_BUSY     PA_8
00007 #define EPD_POWER    PB_10
00008 #define EPD_SPI_MOSI PB_5
00009 #define EPD_SPI_MISO PB_4
00010 #define EPD_SPI_SCK  PB_3
00011 
00012 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
00013 
00014 void Ecran::print()
00015 {
00016     poidsRuche = 48.26;
00017     temperatureRuche = 12.34;
00018     humiditeRuche = 52.47;
00019     
00020     sprintf (ligne1, "La ruche pese actuelement %3fKg",poidsRuche);  
00021     sprintf (ligne2, "La temperature est de %3f C",temperatureRuche);  
00022     sprintf (ligne3, "L'humidite est de %3f %",humiditeRuche);  
00023     sprintf (ligne4, "et la");  
00024     sprintf (ligne5, "on met autre chose");  
00025 
00026     
00027     epd.Clear(EPD_COLOR_WHITE);  
00028 
00029     epd.DisplayStringAtLine(5, (uint8_t*)ligne1, CENTER_MODE);
00030     epd.DisplayStringAtLine(4, (uint8_t*)ligne2, CENTER_MODE);
00031     epd.DisplayStringAtLine(3, (uint8_t*)ligne3, CENTER_MODE);
00032     epd.DisplayStringAtLine(2, (uint8_t*)ligne4, CENTER_MODE);
00033     epd.DisplayStringAtLine(1, (uint8_t*)ligne5, CENTER_MODE);
00034     
00035     
00036     epd.RefreshDisplay();
00037 
00038 }*/