Remote monitoring IoTHub device sample Added real SHTx sensor to get temperature and humidity Added new command to set temperature scale change Removed "mock" commands to set temperature and humidity values It's configured to work on FRDM-K64F board

Dependencies:   EthernetInterface NTPClient SHTx iothub_amqp_transport iothub_client mbed-rtos mbed proton-c-mbed serializer wolfSSL

Fork of remote_monitoring by Azure IoT

Revision:
5:0ac6b44084ed
Parent:
2:90e50410da9b
Child:
6:066c3ca4df78
--- a/main.cpp	Wed Sep 16 23:56:59 2015 -0700
+++ b/main.cpp	Thu Sep 17 00:12:12 2015 -0700
@@ -8,12 +8,13 @@
 #include "asset_monitoring.h"
 #include "NTPClient.h"
 
-void setupRealTime(void)
+int setupRealTime(void)
 {
 	(void)printf("setupRealTime begin\r\n");
 	if (EthernetInterface::connect())
 	{
 		(void)printf("Error initializing EthernetInterface.\r\n");
+		result = __LINE__;
 	}
 	else
 	{
@@ -22,15 +23,19 @@
 		if (ntp.setTime("0.pool.ntp.org") != 0)
 		{
 			(void)printf("Failed setting time.\r\n");
+			result = __LINE__;
 		}
 		else
 		{
 			(void)printf("set time correctly!\r\n");
+			result = 0;
 		}
 		(void)printf("setupRealTime NTP end\r\n");
 		EthernetInterface::disconnect();
 	}
 	(void)printf("setupRealTime end\r\n");
+
+	return result;
 }
 
 int main(void)