mirror of
https://github.com/gabrielkheisa/antares-esp8266-mqtt.git
synced 2025-08-21 11:31:09 +00:00
First upload, ver 0.9.0
This commit is contained in:
20
examples/AntaresMQTTPublish/AntaresMQTTPublish.ino
Normal file
20
examples/AntaresMQTTPublish/AntaresMQTTPublish.ino
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <AntaresESP8266MQTT.h>
|
||||
|
||||
#define ACCESSKEY "your-access-key"
|
||||
#define WIFISSID "your-wifi-ssid"
|
||||
#define PASSWORD "your-wifi-password"
|
||||
|
||||
#define projectName = "your-project-name";
|
||||
#define deviceName = "your-device-name";
|
||||
|
||||
AntaresESP8266MQTT antares(ACCESSKEY);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
antares.setDebug(true);
|
||||
antares.wifiConnection(WIFISSID, PASSWORD);
|
||||
antares.setMqttServer();
|
||||
}
|
||||
void loop() {
|
||||
antares.checkMqttConnection();
|
||||
}
|
Reference in New Issue
Block a user