Open mike-rankin opened 6 years ago
Hi Mike, You only need to add MPU6050 lib to your Arduino Libraries directory and compile it without errors. You can get MPU6050 lib from my Jarzebski Github fork or from his GitHub: https://github.com/jarzebski/Arduino-MPU6050 All libraries from project are forked and starred from my GitHub. Cheers.
I've got it working except for the MPU6050 library on your git repo. I've grabbed this one at: https://github.com/emanbuc/ESP8266_MPU6050/tree/master/examples that specifies what i2c lines the MPU6050 are to use. Line 1118 from while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G)) to while(!mpu.beginSoftwareI2C(4,5,MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G,MPU6050_ADDRESS)) lets it compile error free but the calibration screen when done on a flat surface always has all the balls stuck to one side of the screen.
Hi Mike, I assume you are using Arduino 1.8.5 or later. I tried Emanbuc modification of Jarzebski lib and it works but slowly. He added a new MPU6050 begin ( mpu.beginSoftwareI2C () ) to configure I2C data and Clock lines, but there is the error. Maybe he don't use a I2C LCD too or use a previous Arduino release. At the top of my code you can see the directive: #define ESP32 that tells the compiler to use assignments for ESP32 ( includes hardware I2C pins ). If you define another time I2C pins in mpu.beginSoftwareI2C () function, you are making a conflict with Arduino internal ESP32 assignment and how the LCD is also I2C, you get a super slow screen refresh. At the same time, the screen affects the accelerometer calibration because are I2C devices. Please, use original Jarzebski lib and if you want to use all features of fucking balls, download "obstacle_and_mask" branch.
Best regards...
Thanks for the help. I've followed your instructions best I could but have had no luck. I've tried this sketch: https://github.com/radikalbytes/fuckin_balls/tree/obstacle_and_mask and then this one https://github.com/radikalbytes/fuckin_balls.git along with this library: https://github.com/jarzebski/Arduino-MPU6050
but always see the same error in the serial monitor: Could not find a valid MPU6050 sensor, check wiring!
There is nothing more I can do but thanks for the help anyways.
Awesome project and a big thank you for sharing! I've purchased the individual parts and assembled everything but I'm having trouble with the libraries. I believe I found them all except for the MPU6050.h A few I've tried fail to compile error free, Two possible options might be to: -point to the libraries you used at the top of the sketch -add a Libraries directory to git and just the ones you are using in your Documents/Arduino/Libraries folder
Thanks again.