listeningdaemon/arduino/readme.md

30 lines
948 B
Markdown
Raw Normal View History

2024-10-29 13:46:41 +00: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
```C++
#define VITRINE_SSID "";
#define VITRINE_WIFI_PASS ""
#define MQTT_ARDUINO_USERNAME ""
#define MQTT_ARDUINO_PASS ""
2024-10-29 14:48:07 +00:00
#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"
2024-10-29 13:46:41 +00:00
```
2024-10-29 14:48:07 +00:00
Here, you can also provide some information regarding the type of arduino, and which code you'd like to compile.
2024-10-29 13:46:41 +00:00
### 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 |
2024-10-29 14:48:07 +00:00
| ESP32 DEVKITV1 | DOIT ESP DEVKIT V1 |
2024-10-29 13:46:41 +00:00