
Projet Long pour AGRAL
Dependencies: mbed OneWire DHT22 TSL2561 SSD1306
Revision 11:7c872ac9da9a, committed 2017-11-20
- Comitter:
- Pipou
- Date:
- Mon Nov 20 15:33:30 2017 +0000
- Parent:
- 10:fd7b1648642d
- Child:
- 12:df4ff058ab06
- Child:
- 13:9a8b32c34787
- Commit message:
- Sigfox 5 valeurs, fix affichage
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 20 14:15:39 2017 +0000 +++ b/main.cpp Mon Nov 20 15:33:30 2017 +0000 @@ -62,11 +62,11 @@ float Hum_Sol = Hum_S.read(); // Affichage données, mises en forme, sur la console - printf( "Lum: %f \tTemp_A: %f \tHum_A: %f \tTemp_S: %f \tHum_S: %f\r\n", Lumux, Temp_Air, Hum_Air, Temp_Sol, Hum_Sol); + printf( "Lum: %.2f \tTemp_A: %.2f \tHum_A: %.2f \tTemp_S: %.2f \tHum_S: %.2f\r\n", Lumux, Temp_Air, Hum_Air, Temp_Sol, Hum_Sol); // Envoie données, mises en forme, sur ACTOBOARD sigfox.printf("AT$SF="); - sigfox.printf("%04x%04x",Temp_Air,Hum_Air); + sigfox.printf("%02x%02x%02x%02x%02x",(int)Lumux,(int)Temp_Air,(int)Hum_Air,(int)Temp_Sol,(int)Hum_Sol); sigfox.printf("\n\r"); delete owDevice; @@ -79,11 +79,11 @@ oled.printf("Capteurs\r\n"); oled.printf("\r\n"); oled.set_font(standard_font, 6); - oled.printf("Lum: %f\r\n", Lumux); - oled.printf("Temp_A: %f\r\n", Temp_Air); - oled.printf("Hum_A: %f\r\n", Hum_Air); - oled.printf("Temp_S: %f\r\n",Temp_Sol); - oled.printf("Hum_S: %f\r\n", Hum_Sol); + oled.printf("Lum: %.2f\r\n", Lumux); + oled.printf("Temp_A: %.2f\r\n", Temp_Air); + oled.printf("Hum_A: %.2f\r\n", Hum_Air); + oled.printf("Temp_S: %.2f\r\n",Temp_Sol); + oled.printf("Hum_S: %.2f\r\n", Hum_Sol); oled.printf("\r\n"); oled.update(); }