Add OTA firmware update to primary ESP32

master
Tom Wilson 4 years ago
parent 30f72baa83
commit 6c3de019d4

@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = primary-esp32
default_envs = primary_esp32
[env]
;platform = espressif32
@ -19,9 +19,16 @@ framework = arduino
board = esp32dev
monitor_speed = 57600
[env:primary-esp32]
[env:primary_esp32]
src_filter = +<primary-esp32/*> +<common/*>
lib_deps = plapointe6/EspMQTTClient@^1.13.3
[env:motor-esp32]
[env:primary_esp32_ota]
src_filter = +<primary-esp32/*> +<common/*>
lib_deps = plapointe6/EspMQTTClient@^1.13.3
upload_protocol = espota
upload_port = airseeder.local
upload_flags = "--auth=87usc6rs"
[env:motor_esp32]
src_filter = +<motor-esp32/*> +<common/*>

@ -28,7 +28,7 @@ EspMQTTClient mqtt_client("devtest", // Wifi SSID
"10.9.2.101", // MQTT Broker server ip
"", // Can be omitted if not needed
"", // Can be omitted if not needed
"Airseeder", // Client name that uniquely identify your device
"airseeder", // Client name that uniquely identify your device
1883 // The MQTT port, default to 1883. this line can be omitted
);
@ -42,8 +42,8 @@ void setup() {
Serial.setTimeout(1);
Serial.begin(57600);
i2c_comms_setup();
wheel_speed_setup();
mqtt_client.enableOTA("87usc6rs");
// Hopefully this lets us get missed messages during a connection.
mqtt_client.enableMQTTPersistence();

Loading…
Cancel
Save