Skip to content

Commit

Permalink
add support for M5 IMU and better boards def
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Oct 13, 2024
1 parent 642e60e commit 99aaf1e
Show file tree
Hide file tree
Showing 7 changed files with 1,386 additions and 1,330 deletions.
76 changes: 40 additions & 36 deletions Firmware/Bentuino/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,35 @@
"D:/Projects/Dev/BenTo/Firmware/Bentuino/include",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/M5GFX/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/FastAccelStepper/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/WebSockets/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/M5StickC/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/M5GFX/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/FastAccelStepper/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/WebSockets/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Ethernet/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ESP Async WebServer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/AsyncTCP/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ArtnetWifi/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ESP32Servo/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/SimplexNoise",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Wasm3/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/arduino-timer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit DotStar",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ESP Async WebServer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/AsyncTCP/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ArtnetWifi/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ESP32Servo/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/SimplexNoise",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Wasm3/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/arduino-timer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit DotStar",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/ESPmDNS/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/OSC",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/OSC",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SD/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/FS/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ArduinoJson/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ArduinoJson/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BNO055",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BNO055/utility",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit Unified Sensor",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BusIO",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BNO055",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BNO055/utility",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit Unified Sensor",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BusIO",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit NeoPixel",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit NeoPixel",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include/esp_additions/freertos",
Expand Down Expand Up @@ -265,34 +266,35 @@
"D:/Projects/Dev/BenTo/Firmware/Bentuino/include",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/M5GFX/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/FastAccelStepper/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/WebSockets/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/M5StickC/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/M5GFX/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/FastAccelStepper/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/WebSockets/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Ethernet/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ESP Async WebServer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/AsyncTCP/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ArtnetWifi/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ESP32Servo/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/SimplexNoise",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Wasm3/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/arduino-timer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit DotStar",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ESP Async WebServer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/AsyncTCP/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ArtnetWifi/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ESP32Servo/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/SimplexNoise",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Wasm3/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/arduino-timer/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit DotStar",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/ESPmDNS/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/OSC",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/OSC",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SD/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/FS/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/ArduinoJson/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/ArduinoJson/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BNO055",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BNO055/utility",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit Unified Sensor",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit BusIO",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BNO055",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BNO055/utility",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit Unified Sensor",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit BusIO",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick/Adafruit NeoPixel",
"D:/Projects/Dev/BenTo/Firmware/Bentuino/.pio/libdeps/m5stick-generic/Adafruit NeoPixel",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include",
"C:/Users/bkupe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include/esp_additions/freertos",
Expand Down Expand Up @@ -544,6 +546,8 @@
"BUTTON_DEFAULT_PIN=37",
"USE_FILES",
"FILES_TYPE_SPIFFS",
"USE_MOTION",
"IMU_TYPE_M5MPU",
"HAVE_CONFIG_H",
"MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"",
"UNITY_INCLUDE_CONFIG_H",
Expand Down
76 changes: 28 additions & 48 deletions Firmware/Bentuino/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = m5stick
default_envs = m5stick-generic

[bentuino]
platform = espressif32 @ 6.9.0
Expand Down Expand Up @@ -86,28 +86,23 @@ build_flags =
-D LED_DEFAULT_BRIGHTNESS=0.5f
-D LED_MAX_BRIGHTNESS=0.4f

[env:creatorclub]

[creator]
extends = bentuino
build_flags =
${bentuino.build_flags}
-D BENTUINO_CREATORCLUB
-D USE_POWER
-D POWER_KEEP_PIN=12
-D POWER_WAKEUP_BUTTON=32
-D POWER_WAKEUP_BUTTON_STATE=true
-D USE_LEDSTRIP
-D USE_STREAMING
-D LEDSTRIP_MAX_COUNT=1
-D LED_DEFAULT_EN_PIN=27
-D LED_DEFAULT_DATA_PIN=25
-D LED_DEFAULT_CLK_PIN=26
-D LED_DEFAULT_COUNT=32
-D LED_DEFAULT_TYPE=SK9822
-D LED_DEFAULT_COLOR_ORDER=BGR
-D LED_DEFAULT_INVERT_DIRECTION=true
-D LED_DEFAULT_BRIGHTNESS=0.5f
-D LED_MAX_BRIGHTNESS=0.4f
-D LED_MAX_COUNT=32
-D PLAYBACK_USE_ALPHA
-D PLAYBACK_MAX_SCRIPTS=32
-D USE_FX
Expand All @@ -134,63 +129,44 @@ build_flags =
-D FILES_DEFAULT_SD_SCK=14
-D FILES_DEFAULT_SD_CS=15
-D USE_MOTION
-D IMU_TYPE_BNO055
-D IMU_DEFAULT_INT=33
-D IMU_DEFAULT_SDA=23
-D IMU_DEFAULT_SCL=22
-D IMU_DEFAULT_ADDR=0x28


[env:creatorclub]
extends = creator
build_flags =
${creator.build_flags}
-D BENTUINO_CREATORCLUB
-D USE_POWER
-D POWER_WAKEUP_BUTTON=32
-D USE_LEDSTRIP
-D USE_STREAMING
-D LED_DEFAULT_CLK_PIN=26
-D LED_DEFAULT_TYPE=SK9822
-D LED_DEFAULT_COLOR_ORDER=BGR
-D LED_DEFAULT_INVERT_DIRECTION=true
-D LED_MAX_COUNT=32

[env:creatortab]
extends = bentuino
extends = creator
build_flags =
${bentuino.build_flags}
${creator.build_flags}
-D BENTUINO_CREATORTAB
-D USE_POWER
-D POWER_KEEP_PIN=12
-D POWER_WAKEUP_BUTTON=36
-D POWER_WAKEUP_BUTTON_STATE=true
-D USE_LEDSTRIP
-D USE_STREAMING
-D LEDSTRIP_MAX_COUNT=1
-D LED_DEFAULT_EN_PIN=27
-D LED_DEFAULT_DATA_PIN=25
-D LED_DEFAULT_CLK_PIN=-1
-D LED_DEFAULT_COUNT=32
-D LED_DEFAULT_TYPE=WS2812B
-D LED_DEFAULT_COLOR_ORDER=GRB
-D LED_DEFAULT_INVERT_DIRECTION=false
-D LED_DEFAULT_BRIGHTNESS=0.5f
-D LED_MAX_BRIGHTNESS=0.4f
-D LED_MAX_COUNT=1000
-D PLAYBACK_USE_ALPHA
-D PLAYBACK_MAX_SCRIPTS=32
-D USE_FX
-D USE_BUTTON
-D BUTTON_MAX_COUNT=4
-D BUTTON_DEFAULT_PIN=36
-D USE_IO
-D IO_MAX_COUNT=4
-D IO_DEFAULT_PIN=-1
-D IO_DEFAULT_MODE=IOComponent::PinMode::A_OUTPUT
-D USE_BATTERY
-D BATTERY_DEFAULT_PIN=35
-D BATTERY_DEFAULT_CHARGE_PIN=39
-D BATTERY_DEFAUT_RAW_MIN=222
-D BATTERY_DEFAULT_RAW_MAX=335
-D BATTERY_DEFAULT_LOW_VOLTAGE=3.3f
-D USE_FILES
-D FILES_DEFAULT_SDSPEED=27000000
-D FILES_DEFAULT_SD_EN=33
-D FILES_DEFAULT_SD_POWER_VALUE=LOW
-D FILES_DEFAULT_SD_MISO=19
-D FILES_DEFAULT_SD_MOSI=13
-D FILES_DEFAULT_SD_SCK=14
-D FILES_DEFAULT_SD_CS=15
-D USE_MOTION
-D IMU_DEFAULT_INT=34
-D IMU_DEFAULT_SDA=23
-D IMU_DEFAULT_SCL=22
-D IMU_DEFAULT_ADDR=0x28
-D USE_SCRIPT


[env:olimex]
extends = bentuino
Expand Down Expand Up @@ -267,12 +243,16 @@ build_flags =
-D BUTTON_DEFAULT_PIN=37
-D USE_FILES
-D FILES_TYPE_SPIFFS
-D USE_MOTION
-D IMU_TYPE_M5MPU

lib_deps =
${bentuino.lib_deps}
m5stack/M5GFX@^0.1.15
m5stack/M5StickC


[env:m5stick]
[env:m5stick-generic]
extends = m5stickc
board = m5stick-c

Expand Down
Loading

0 comments on commit 99aaf1e

Please sign in to comment.