Skip to content

Conversation

@caveman99
Copy link
Member

BMI270 WIP

BMI270 WIP
@github-actions github-actions bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Feb 5, 2026
@caveman99 caveman99 added the enhancement New feature or request label Feb 5, 2026
@caveman99 caveman99 marked this pull request as ready for review February 5, 2026 16:41
@caveman99 caveman99 requested a review from Copilot February 5, 2026 16:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for a new M5Stack Cardputer Advanced hardware variant with BMI270 6-axis IMU sensor integration. The PR is marked as "WIP" (Work In Progress) per the description "BMI270 WIP".

Changes:

  • Adds new M5Stack Cardputer Advanced ESP32-S3 variant with ST7789 display, TCA8418 keyboard, BMI270 IMU, and ES8311 audio codec
  • Implements BMI270 sensor driver with motion detection capabilities for screen wake
  • Integrates CardputerKeyboard implementation based on TCA8418 keyboard controller with multi-tap character input

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
variants/esp32s3/m5stack_cardputer_adv/variant.h Hardware pin definitions for new Cardputer variant including display, keyboard, GPS, audio, and BMI270 IMU
variants/esp32s3/m5stack_cardputer_adv/platformio.ini Build configuration with ESP32-S3 base, required libraries for ST7789 display, audio, and NeoPixel
variants/esp32s3/m5stack_cardputer_adv/pins_arduino.h Arduino pin mappings for SPI, I2C, and serial interfaces
src/motion/BMI270Sensor.h Header defining BMI270 sensor class with I2C register access and motion detection interface
src/motion/BMI270Sensor.cpp BMI270 driver implementation including 8KB config file upload and accelerometer-based wake detection
src/motion/AccelerometerThread.h Integration of BMI270 sensor into accelerometer thread
src/input/CardputerKeyboard.h Keyboard class definition for TCA8418-based Cardputer keyboard
src/input/CardputerKeyboard.cpp Keyboard implementation with multi-tap character input and modifier key support
src/input/kbI2cBase.cpp Integration of Cardputer keyboard into I2C keyboard base class
src/graphics/Screen.cpp Conditional compilation fixes for ST7789 displays without VTFT_LEDA pin
src/detect/ScanI2CTwoWire.cpp I2C device detection for BMI270 (chip ID 0x24)
src/detect/ScanI2C.h Addition of BMI270 device type enum
src/detect/ScanI2C.cpp Integration of BMI270 into accelerometer device detection
src/configuration.h BMI270 I2C address definitions (0x68, 0x69)
src/platform/esp32/architecture.h Hardware model mapping for M5STACK_CARDPUTER_ADV

caveman99 and others added 3 commits February 5, 2026 20:37
@caveman99
Copy link
Member Author

This combines the original work from #8010 and the observations during the review process, as well as findings from https://www.reddit.com/r/CardPuter/comments/1pxjryj/working_meshtastic_firmware_for_the_cardputer_adv/ It adds Support for the accelerometer and sound module.

@caveman99
Copy link
Member Author

thanks for all the detective work and constructive discussion on this device to @RaymiiOrg, @mverch67, @WillyJL and @Szetya - i hope to pull in the inprovements from #7989 next.

@WillyJL
Copy link
Contributor

WillyJL commented Feb 5, 2026

thanks for all the detective work and constructive discussion on this device to @RaymiiOrg, @mverch67, @WillyJL and @Szetya - i hope to pull in the inprovements from #7989 next.

about #7989, i had ported my keyboard changes to the WIP cardputer adv keyboard here: WillyJL@a7928b1

im assuming the keyboard implementation has changed in the meantime so this commit will probably need additional changes, but i hope this commit can help update your pr once 7989 is merged (or update 7989 if this pr is merged first).

thanks for taking over and the further attention, i had only opened my cardputer adv pr to start off but dont even have that device and couldnt help further.

@RaymiiOrg
Copy link

thanks for all the detective work and constructive discussion on this device to @RaymiiOrg, @mverch67, @WillyJL and @Szetya - i hope to pull in the inprovements from #7989 next.

Thanks to you we might get first class support for all hardware in the Cardputer! 😄

@WillyJL WillyJL mentioned this pull request Feb 5, 2026
10 tasks
@RaymiiOrg
Copy link

RaymiiOrg commented Feb 6, 2026

It seems that ( with or without ) the led enabled, the screen doesn't turn off its backlight anymore. The top cardputer runs this branch, the bottom runs my old branch. The screen is set to turn off after 30 sec on both. (The bottom cardputer has the ambient led off, but is running)

os

@psifertex
Copy link

Thanks for the work @caveman99 -- did you happen to check my branch as well which was linked in that thread? A few of QoL features in there as well:

I'll try to check it out when I have more time and re-apply them to this branch if not.

@RaymiiOrg
Copy link

After a few days of testing it seems that the screen freezes after a while. The app connection (wifi) still works, sending and such, but no response to input (the screen doesn't change and no messages can be sent from the device).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants