listeningdaemon/arduino/MQTT
2024-10-29 14:46:41 +01:00
..
certificate.h working ish code with an empty secrets file 2024-10-28 13:45:52 +01:00
MQTT.ino include relay stuff 2024-10-29 14:46:41 +01:00
readme.md include relay stuff 2024-10-29 14:46:41 +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 ""

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
... ...

3. Do something with the make files

arduino-cli compile -b arduino:avr:uno --build-property "build.extra_flags="-DMY_DEFINE="hello world""" /home/user/Arduino/MySketch