Awesome! Thank you. Much appreciated.
I will blatantly ‘steal’ your work to automate my Z6.
Did you make any progress there? Can you please share which values need changing?
On a general note: I have now three hours on the EGO Z6; it is not as easy to control, more so lacking the accuracy I have with my CubCadet ZT2… which might explain the trouble adjusting/tuning the turns. Different lever positions seem to achieve the same turn. E.g. a stationary left turn may need half back left, centre right lever, or full back left and a quarter forward right… really weird. In contrast the ZT2 produces exact turns with the same lever positions. (Lever = lap arm.)
For those who are using VScode and PlatformIO, the platformio,ini
below results in a successful compile (at least on my Linux OS); please note to add #include <Arduino.h>
at the beginning of the C file. I also changed:
byte messCntr,leverState;
to
uint8_t messCntr,leverState;
platformio.ini:
[env:esp32doit-devkit-v1]
;platform = espressif32
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
board = esp32doit-devkit-v1
framework = arduino, espidf
PlatformIO is still on the Arduino-ESP32 2.x core, hence, the Tasmota fork is required.
Compile result:
* Terminal will be reused by tasks, press any key to close it.
* Executing task in folder EGO_Automation: platformio run
Processing esp32doit-devkit-v1 (platform: https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5; board: esp32doit-devkit-v1; framework: arduino, espidf)
-------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (2024.6.10+sha.5036bba) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.0.1+sha.9736e2b
- framework-espidf @ 3.50104.0 (5.1.4)
- tool-cmake @ 3.21.3
- tool-esptoolpy @ 4.7.3
- tool-mklittlefs @ 3.2.0
- tool-ninja @ 1.7.1
- tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
- tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
- toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
- toolchain-xtensa-esp32 @ 12.2.0+20230208
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
Warning! Flash memory size mismatch detected. Expected 4MB, found 2MB!
Please select a proper value in your `sdkconfig.defaults` or via the `menuconfig` target!
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 25 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/esp32doit-devkit-v1/src/main.cpp.o
Linking .pio/build/esp32doit-devkit-v1/firmware.elf
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 3.8% (used 12388 bytes from 327680 bytes)
Flash: [= ] 6.2% (used 258457 bytes from 4194304 bytes)
Building .pio/build/esp32doit-devkit-v1/firmware.bin
esptool.py v4.7.3
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
================================================= [SUCCESS] Took 6.30 seconds =================================================
* Terminal will be reused by tasks, press any key to close it.
I will sort out the warnings later, which is config related, the sweat was in getting this to compile.