-
Thực hiện: Thi Minh Nhựt - Email: thiminhnhut@gmail.com
-
Thời gian: Ngày 08 tháng 03 năm 2019
-
Cloud MQTT: https://www.cloudmqtt.com/: đăng ký tài khoản và Config: (Xem hướng dẫn cách config Cloud MQTT: https://hocarm.org/mqtt-va-esp8266/)
-
Thay đổi một số config trong
include/Configuration.h:#define MQTT_SERVER "m16.cloudmqtt.com" #define MQTT_PORT 14863 const char* MQTT_USER = "mqtt_user"; const char* MQTT_PASSWORD = "mqtt_password"; const char* TOPIC_SUB_LOAD = "mqtt_topic";
-
Sử dụng LED để test (trong
include/Configuration.h):#define LED_STATUS_WIFI 2 #define LED_STATE_WIFI LOW #define ON_LOAD '1' #define OFF_LOAD '0'
-
Kết nối WiFi với giao thức
SmartConfig(sử dụng AppEsptouchhoặcESP8266 SmartConfig). -
Gửi
1thìLED_STATUS_WIFIsáng, gửi0thìLED_STATUS_WIFIkhông sáng. -
Các file trong chương trình:
-
Config project platformio.ini
-
File: Configuration.h
-
File main.cpp
-