20170825 Test
Dependencies: DHT11 NetworkSocketAPI WizFi310Interface mbed
Fork of WizFi310_STATION_HelloWorld by
Diff: main.cpp
- Revision:
- 8:6b6f8b4d0f25
- Parent:
- 7:8ad9f9bd39b3
--- a/main.cpp Thu Oct 19 04:38:50 2017 +0000
+++ b/main.cpp Thu Oct 19 04:52:53 2017 +0000
@@ -35,7 +35,6 @@
#define CDS_SENSOR CDS_Sensor
#define DHT_SENSOR DHT_Sensor
-#define LED LED_Sensor
#if defined(TARGET_WIZwiki_W7500)
Serial pc(USBTX, USBRX);
@@ -43,10 +42,8 @@
AnalogIn myLux( CDS_SENSOR );
Dht11 myTemp( DHT_SENSOR );
- DigitalOut myled( LED );
#endif
-
int main()
{
int error = 0;
@@ -99,21 +96,7 @@
else if(c == 'r' || c == 'R')
{
- int a;
-
- a = wifi.recvTP(COMMAND_NM, 3, 0);
-
- if( a == 1 )
- {
- printf("Turn On!\r\n\r\n");
- myled = 1;
- }
-
- else if( a == 2)
- {
- printf("Turn OFF!\r\n\r\n");
- myled = 0;
- }
+ wifi.recvTP(COMMAND_NM, 3, 0);
wait_ms(3000);
}
