Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:4e3a5fe26557
- Parent:
- 0:8fe7d36af056
--- a/main.cpp Mon Mar 17 12:35:48 2014 +0000
+++ b/main.cpp Fri Feb 03 07:52:55 2017 +0000
@@ -1,12 +1,12 @@
#include "mbed.h"
-DigitalOut LCD_RS(D8);
-DigitalOut LCD_EN(D9);
-DigitalOut LCD_D4(D4);
-DigitalOut LCD_D5(D5);
-DigitalOut LCD_D6(D6);
-DigitalOut LCD_D7(D7);
+/*DigitalOut LCD_RS(PC_6);
+DigitalOut LCD_EN(PC_5);
+DigitalOut LCD_D4(PD_8);
+DigitalOut LCD_D5(PA_12);
+DigitalOut LCD_D6(PA_11);
+DigitalOut LCD_D7(PB_12);
//########################################
@@ -94,6 +94,7 @@
lcd_putcmd(0x0c); //display on
}
+*/
//########################################
// End of LCD Library
//########################################
@@ -104,7 +105,7 @@
Timer tmr;
-DigitalInOut data_pin(A1);
+DigitalInOut data_pin(PB_10);
int humidity;
int temperature;
@@ -191,9 +192,9 @@
int main(void){
- lcd_initial();
+// lcd_initial();
- lcd_puts("=Nucleo - DHT11=");
+// lcd_puts("=Nucleo - DHT11=");
for(;;){
@@ -202,18 +203,20 @@
//sprintf(buffer, "Temp %2d C ", temperature);
//lcd_putcmd(0x80);
//lcd_puts(buffer);
- sprintf(buffer, "Hum %2d%% Tmp %2dc", humidity, temperature);
- lcd_putcmd(0xc0);
- lcd_puts(buffer);
+// sprintf(buffer, "Hum %2d%% Tmp %2dc", humidity, temperature);
+// lcd_putcmd(0xc0);
+// lcd_puts(buffer);
+ printf("Hum %2d%% Tmp %2dc\n\r", humidity, temperature);
wait(0.5);
- }else{
+ }
+ else{
- lcd_putcmd(0x80);
- lcd_puts("Sensor Error !!!");
- lcd_putcmd(0xc0);
- lcd_puts(" ");
-
+ // lcd_putcmd(0x80);
+ // lcd_puts("Sensor Error !!!");
+ // lcd_putcmd(0xc0);
+// lcd_puts(" ");
+ printf("Sensor Error !!!\n\r");
}
}