20170825 Test
Dependencies: DHT11 NetworkSocketAPI WizFi310Interface mbed
Fork of WizFi310_STATION_HelloWorld by
Revision 5:abbccd77ad5d, committed 2017-08-28
- Comitter:
- cliff1
- Date:
- Mon Aug 28 23:28:48 2017 +0000
- Parent:
- 4:597b0c6ccba2
- Child:
- 6:ece3b06b9aba
- Commit message:
- 20170829 ThingPlug
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Aug 28 08:25:42 2017 +0000
+++ b/main.cpp Mon Aug 28 23:28:48 2017 +0000
@@ -22,19 +22,19 @@
#include "WizFi310Interface.h"
#include "Dht11.h"
-#define AP_SSID "SSID" // Input SSID
-#define AP_PASSWORD "PASSWORD" // Input PW
-#define AP_SECURITY NSAPI_SECURITY_WPA2
+#define AP_SSID "Dap"
+#define AP_PASSWORD "00001111"
+#define AP_SECURITY NSAPI_SECURITY_WPA2
-#define USER_ID "User ID"
-#define CREDENTIAL_ID "Credential ID"
-#define SERVICE_ID "Service ID"
-#define DEVICE_ID "Device ID"
-#define COMMAND_NM "Command Name"
-#define CONTAINER_NAME "Containet Name"
+#define USER_ID "cliff13"
+#define CREDENTIAL_ID "R0NNaXc1TGZmV2JVb0JzZEp3QnorSDZrYXZWanFod3hlZ0VkMEFycktRN0Z4SFpCb1JSUmdnMENUL0h4K3VZVg=="
+#define SERVICE_ID "cliff_service"
+#define DEVICE_ID "WIZnet_Device_01"
+#define COMMAND_NM "WIZnet_Device_01"
+#define CONTAINER_NAME "WIZnet"
-#define CDS_SENSOR CDS_SENSOR
-#define DHT_SENSOR DHT_SENSOR
+#define CDS_SENSOR PC_15
+#define DHT_SENSOR PC_7
#if defined(TARGET_WIZwiki_W7500)
Serial pc(USBTX, USBRX);
@@ -78,8 +78,8 @@
temp = (double)(myTemp.getCelsius());
humid = (int)myTemp.getHumidity();
- sprintf((char *)str, "0106%08x020a%08x0306%08x",
- lux, temp, humid);
+ sprintf((char *)str, "0106%08x0206%08x0306%08x",
+ lux, (int)temp, humid);
printf("lux value : %04d, temp value : %.1lf, humidity value : %04d\r\n",
lux, temp, humid);
