KK4TEE / M5OSC

Sending sensor data from an M5 Stick C using Open Sound Control
MIT License
5 stars 0 forks source link

error on upload #3

Closed garrett-laroy-johnson closed 2 years ago

garrett-laroy-johnson commented 4 years ago

hi there -- I'm getting this error on upload

In function 'void DecideGyroType()': M5OSC:151:10: error: 'class IMU' has no member named 'sh200i_Reset' M5.IMU.sh200i_Reset(); ^ M5OSC:152:10: error: 'class IMU' has no member named 'sh200i_ADCReset' M5.IMU.sh200i_ADCReset(); ^

KK4TEE commented 4 years ago

Hi, My first guess is that the library has updated since this project was uploaded, or there is a different IMU on the device you are using. I'd suggest checking around the imuType = SH200Q; code and see if you can set it manually or commenting out the reset code as a quick fix.

I'll see if I can load it up and replicate the issue.

KK4TEE commented 4 years ago

I was able to replicate the issue. Looks like the M5.IMU library was updated to better support the different types of IMU available and the M5 methods specific to the sh200i were removed. I've updated the project by changing the calls to sh200i_Reset and sh200i_ADCReset to specifically point to the SH200Q methods instead of the M5 general methods. Please let me know if this fixes the issue for you!

IMU Library for reference: https://github.com/m5stack/M5StickC/blob/a5a5ca9743a8ff0176072aacba73e9a5fc701d85/src/IMU.cpp#L10 SH200Q specific reset: https://github.com/m5stack/M5StickC/blob/a5a5ca9743a8ff0176072aacba73e9a5fc701d85/src/utility/SH200Q.cpp#L52

garrett-laroy-johnson commented 4 years ago

Hi Seth thanks so much for looking at this so quickly!

The code uploads to the M5sticsk with the new IMUs (MPU6886) without any problem. I'm able to connect to local network as well without issue, and ESP32 is sending OSC data. However, "decide IMU" block doesn't seem to be working correctly. My M5 displays that it is SH200Q and is outputting only 0s for all IMU axis.

KK4TEE commented 4 years ago

Thank you for the feedback! I will go through my parts drawer and try to find a working unit with an MPU6886, troubleshoot, and get back to you.