car

Dependencies:   mbed

Fork of warehouse by Keegan Hu

Revision:
5:9a0acd11c445
Parent:
4:46e5e96a6233
Child:
7:49a823b5a935
diff -r 46e5e96a6233 -r 9a0acd11c445 main.cpp
--- a/main.cpp	Mon Nov 13 20:34:24 2017 +0800
+++ b/main.cpp	Wed Nov 15 06:12:24 2017 +0000
@@ -30,7 +30,7 @@
     //声明所有的执行器,每行一个,每个由名字、参数类型两部分组成,最后一行必须为空指针作为结尾
     //服务器收到声明后,将在网页上显示这些执行器
     const char* actuators[][2] = {
-        "switch1", "int",
+        "servo1", "int",
         "switch2", "int",
         NULL, NULL //最后一行以空指针作为结束标记
     };
@@ -64,6 +64,8 @@
             client.publish_value("pressure", "100000 Pa");
             client.publish_value("temperature", "20 C");
             client.publish_value("humidity", "30 %");
+            
+            last_report = t.read();
         }
     }
 }