runeharlyk / SpotMicroESP32-Leika

My take on the quadruped Spot Micro robot. Its built around an ESP32 cam microcontroller and utilizes a svelte app to control it
MIT License
26 stars 2 forks source link

I2C Issues #51

Closed Ian-cmd-ops closed 5 months ago

Ian-cmd-ops commented 5 months ago
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
[   486][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[   499][I][ESP32SvelteKit.cpp:77] begin(): [Running Firmware Version: %s] 0.0.1
[   729][I][EventSocket.cpp:190] onSubscribe(): [EventSocket] onSubscribe for event: WiFiSettings
[   772][I][EventSocket.cpp:190] onSubscribe(): [EventSocket] onSubscribe for event: angles
[   772][I][CameraService.cpp:86] InitializeCamera(): Initializing camera
[  1007][I][EventSocket.cpp:190] onSubscribe(): [EventSocket] onSubscribe for event: CameraSettings
[  1009][I][EventSocket.cpp:190] onSubscribe(): [EventSocket] onSubscribe for event: ConfigurationSettings
[  1049][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=14 scl=15 freq=100000
[  2051][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  3052][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  4053][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  5054][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  6055][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  7056][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  8158][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  9262][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[  9262][E][IMUService.h:36] begin(): [IMUService] MPU initialize failed
[ 10264][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[ 11265][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[ 12266][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[ 13267][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[ 14268][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
[ 14268][E][IMUService.h:52] begin(): [IMUService] BMP initialize failed
[ 14947][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 15447][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 15948][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 16449][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 16952][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 17452][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 17953][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 18454][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 18957][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 19458][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 19959][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 20460][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 20963][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 21464][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 21965][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 22466][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 22969][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 23469][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 23971][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 24471][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1

I went I upload and monitor, I get this. I've also been getting issues trying to connect I2C to connect to the MPU and GPY. Do you think adding the multiplexer would help clean up some of the wiring. Adafruit TCA9548A I2C Multiplexer

Ian-cmd-ops commented 5 months ago

My other suggest besides the Multiplex I showed is this, https://www.amazon.com/Breakout-Serial-Wombat-PCB_0012-Expansion/dp/B0BW9WVMPV/ref=sr_1_6?dib=eyJ2IjoiMSJ9.TIvK1IMvf0t9czVne1RiCLzg8uUflOZnluLTGLvWYhZQBHf5jjTwicpp0acOwvu-T_X9OcESJZOg4bnUolZANq-MSftNW_a2qRVBup6Bjnd_HhpAK-8J3OVVmaZt6DjCdCQk49oEfVjEOjiSvF2NSlNyyXHW01IdMEV9czcsEmBs9Fr2I3REb74-yOOCopFknSSVQ0YC0L6oDiOxA2ZuNQAZJ7_JK6Ml0CnNX5fyjNw.kYBIaB8YbA2HIfIA2_yaB0ggO472yoI3Xm0saL7gFNQ&dib_tag=se&keywords=i2c&qid=1717637336&sr=8-6 I think it should be added to the BOM

runeharlyk commented 5 months ago

The error you are getting indicates the devices (IMU & BMP) aren't able to communicate. Double check the connection or test them in isolation to confirm they are working. Are the onboard lights turning on?

I don't think it would benefit to add a I2C multiplexer as their goal is to enable communication with multiple I2C devices that share address. Like if you had 3 MPU6050 you would use a multiplexer. The breakout board on the other hand can be very helpful to share connections using jumpers. I personally use one for my testing rig. If you have some male header pins and a prototyping board lying around, you can make one very easily.

Ian-cmd-ops commented 5 months ago

Got I2C output. It's a breadboard issue. Appreciate the hell out you for your commitment to this project.