QAQ ==!
Dependencies: mbed QEI-1 nRF24L01P xiugai
main.cpp
- Committer:
- zhangyx
- Date:
- 2019-11-08
- Revision:
- 8:ec92c8510ece
- Parent:
- 7:6f8157c58241
- Child:
- 10:cda7ae2fc9de
File content as of revision 8:ec92c8510ece:
#define HIGH 1 #define LOW 0 #include "mbed.h" #include <string> typedef bool boolean; typedef std::string String; #include "esp8266.h" int main() { Esp8266 Esp8266client_(PB_6, PA_10, "iot_xxx", "12345678"); const char* esp8266sensors_[][2] = {{"light",""},{"switch",""},{NULL,NULL}}; const char* esp8266actuators_[][2] = {{"door",""},{"motor",""},{NULL,NULL}}; Esp8266client_.connect_mqtt_broker("192.168.12.1", "node1", esp8266sensors_, esp8266actuators_); Esp8266client_.publish_value("light", "0"); }