listeningdaemon/arduino/MQTT
2024-10-29 15:48:07 +01:00
..
certificate.h working ish code with an empty secrets file 2024-10-28 13:45:52 +01:00
MQTT.ino second arduino 2024-10-29 15:48:07 +01:00
readme.md second arduino 2024-10-29 15:48:07 +01:00

Running the Arduino side

The arduino listens to MQTT messages, and acts accordingly. Each arduino can serve a different purpose, for instance, running motor shields, or turning a fan on/off.

1. Create your own "secret.h" file, following this format

#define VITRINE_SSID "";
#define VITRINE_WIFI_PASS ""
#define MQTT_ARDUINO_USERNAME ""
#define MQTT_ARDUINO_PASS ""
#define hasMotorshield false # Set this if the current arduino has motors attached
#define hasRelayShield false # Set this if the current arduino has power attached
#define arduinoName "motor-arduino"

Here, you can also provide some information regarding the type of arduino, and which code you'd like to compile.

2. Select your board to compile with. As I always forget which boards to select, here's my cheat sheet:

Arduino Board
ArduinoWifi LOLIN(WeMos) D1 R1
ESP32 DEVKITV1 DOIT ESP DEVKIT V1