9
votes
Accepted
Change I2C Pins on Raspberry Pi
You can implement a software I2C bus on any pair of spare GPIO. You will need to add resistor pull-ups to 3V3 on any spare GPIO you use. For reference pins 3 and 5 have 1k8 pull-ups to 3V3.
You ...
3
votes
Self-balancing robot using Raspberry 3b+
Brick's answer is already very comprehensive, but I would like to add a couple of things:
time.sleep is a blocking function, which implies that, at each loop, before you perform a new calculation in ...
3
votes
Self-balancing robot using Raspberry 3b+
We don't know anything about your robot's size or shape, and that could matter. Some shapes are easier to balance, for example, and therefore probably less sensitive to control timing delays. ...
3
votes
Self-balancing robot using Raspberry 3b+
The code is written in Python which is an interpreted language. It will be somewhat slower than a compiled language such as C.
You have many print statements in the code. That will slow the main ...
2
votes
Raspberry Pi Detects I2C Device Sometimes
The only reason for an intermittent connection is a loose connection. I suggest you check that each wire is securely soldered in place.
It is safer to power from 3V3 rather than 5V if the module ...
2
votes
Raspberry Pi not detecting MPU6050 with i2cdetect
You should not need to use sudo with i2cdetect.
The most likely problem is not connecting ADO to either ground or 3V3.
1
vote
Raspberry Pi Detects I2C Device Sometimes
A lot of stuff about MPU 9250 in https://learn.sparkfun.com/tutorials/mpu-9250-hookup-guide (i2c, pull up, datasheet, ...).
For the power and the address selection :
VDD Power supply +...
1
vote
Accepted
1
vote
I2C OS error when activating motors
Do you power the raspberry pi and the motors from the same source? The motors will draw quite some current. So, when they get activated, there will by some spikes on the power source which might ...
1
vote
Handling computer mouse pointer with MPU6050 sensor
I think the easiest practical way to achieve this is to get an Arduino based on a 32u4 chip (Leonardo / Esplora / Zero), attach the MPU to it and implement a mouse using the Mouse functions.
You can ...
1
vote
Seperate GPIO pin outputs influencing sensor readings
Try disconnecting the motor driver from the Pi and repeating the measurements. If they become unstable the moment you start controlling the motor, there is likely a software bug in your code.
...
1
vote
MPU6050 data logging start and stop on button press
Question
The OP already has a working python program which logs the readings of an accelerometer MPU6050 and write to a CSV file.
Now he wishes to have advice and direction on how to write another ...
1
vote
MPU6050 data logging start and stop on button press
You may need a few changes first.
Run a groups command on the Pi and make sure your current user (most likely: pi) is a part of gpio group. If you're not, run the following: usermod -a -G gpio pi (...
1
vote
Accepted
Rasberry with MPU6050 detects strange peaks in acceleration and gyroscope measurements
I had a very similar-looking problem a few years ago, and posted a question in Electronics SE. @BrianDrummond figured it out and posted this answer:
Errors look like +/-256 +/- expected drift.
This ...
1
vote
OSError: [Errno 121] Remote I/O error or pigpio.error: 'I2C read failed' on MPU6050
I don't have a MPU6050 so I can't really test this.
However I suggest you look at this ADXL345 example and try similar code to read registers X, Y, Z as a block.
import sys
if sys.version > '...
1
vote
How many i2c buses?
What do you mean by at once?
You can buy two TCA9548A I2C multiplexors which will allow you to connect 16 MPU6050 on the same bus (at the same bus address). However only one MPU6050 may be addressed ...
1
vote
MPU6050 Python Library
This snippet will provide angle after manipulating the values from MPU-6050
MPU-6050-kalman-filter-python .
Reading gyroscope and accelerometer values from MPU-6050 is just reading the data from an ...
1
vote
Accepted
How to set up MPU6050's registers properly?
I ran in to the same problem during a project week at Uni, so have started developing a library to allow easy interfacing with a MPU6050 via the I2C Bus. The library is written in C++ and assumes some ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mpu6050 × 27i2c × 13
python × 6
raspbian × 4
sensor × 3
gpio × 2
pi-4 × 2
pi-zero-w × 2
pigpio × 2
pi-3 × 1
pi-2 × 1
pi-3b+ × 1
hardware × 1
pi-zero × 1
rpi.gpio × 1
raspbian-jessie × 1
wireless × 1
python-3 × 1
raspicam × 1
arduino × 1
streaming × 1
modules × 1
bit-bang × 1
bmp180 × 1
step-motor × 1