Using the IDW01M1 board for the STM32 Nucleo F401RE board. This project reads data from Air quality MQ135 click and then read DHT11 values and publish on a private channel on the Thingspeak. A Good example of IoT project with the IDW01 board

Dependencies:   DHT11 NetworkSocketAPI X_NUCLEO_IDW01M1v2 mbed

Fork of AirQuality_Thingspeak by Imran Sheikh

This example project uses IDW01M1 WiFi Module to support IoT projects with example sensors such as Airquality Click MQ135 and DHT11 sensor. The sensor values are then published on the Thingspeak channel. The program uses the DHT11, NetworksocketApi and the SPW library fromX_Nucleo_IDW01M1_v2. This project can easily be adapted to add further sensors or use ESP8266 WiFi module as plenty of support is available on mbed.

Revision:
9:13bd9c989e6c
Parent:
8:74b827befe72
Child:
10:cc61a766cd1f
--- a/main.cpp	Thu Jan 05 09:39:03 2017 +0000
+++ b/main.cpp	Tue Jan 10 09:20:31 2017 +0000
@@ -144,8 +144,10 @@
     int t=0;
     scanf("%d",&t);
     printf ("entered time is: %d \n\r", t);
-    if (t != 0) { time_t txTm = t; set_time(txTm); }
-    printf ("The current system time is: %s", ctime (&ctTime));
+    if (t != 0) { time_t txTm = t; set_time(txTm); }  // set Nucleo system time
+    ctTime = time(NULL);    
+    printf ("The current system time is: %s", ctime (&ctTime));  // set WiFi module systm time
+    if (!spwf.set_time(ctTime)) printf ("ERROR set_time\n\r");       
     if (!spwf.clean_TLS_certificate(ALL)) printf ("ERROR clean_TLS_certificate\n\r");
     if (!spwf.set_TLS_certificate(CA_cert, sizeof(CA_cert), FLASH_CA_ROOT_CERT)) printf ("ERROR set_TLS_certificate\n\r");
     if (!spwf.set_TLS_SRV_domain("www.amazon.it",FLASH_DOMAIN)) printf ("ERROR set_TLS_CA_domain\n\r");