What operating system are you running on your RPi? What schedulers are you using?
You will not achieve anything close to 100hz on RPi without going without your own distribution. It is not reliable enough.
Twaddle - I run standard Raspian, and my flight controller code spins at 200Hz easily. Each loop, it checks the commands, reads the sensors, passes the results through 8 PIDs, feeds the output to the PWM and on to the ESCs. And this is all in Python. I could increase the speed by a huge amount by moving to pypy, Cython, C or C++ but there's no need.gregd72002_ wrote: You will not achieve anything close to 100hz on RPi without going without your own distribution. It is not reliable enough.
Just to say, that I could get it to work. I missed adding user to i2c group. Once its done, it worked.Shresta wrote:Hi,
I installed the code and tried to run it. When I try "demo_raw", I get the message
"Failed to open device : Permission Denied.
a/g 0 0 0 0 0 0"
What am I missing.
I checked the device address, it is 0x68.
Please help me get it to work.Thanks.
Some how, Im not satisfied with the readings I got. Interested in knowing how you could achieve 0.1 % accuracy, if you don't mind sharing.Hove wrote:That's pretty close to the accuracy of the sensors of 2%. Only calibration will improve it - I've got mine to about 0.1%. BUT - you don't need that level of accuracy from angles, what you have should be fine.
Accuracy is only needed if you are integrating the accelerometer values to produce velocity; 2% error in that means 1g may read as 1.02g or an acceleration of 0.2m/s/s which builds up rapidly when integrated.
Perhaps to lateMegaguigui wrote:I'm able to compile and build,but i can't run (execut) the program![]()
Didn't you use Geany,just for give me the run command ? ^^
Its already implemented in the code on github - refer first post of this topic. There are functions in there, which will help you understand the conversion.USW wrote:Hello i need a way to convert the Gyro reading into angles. how can i do that
Could you plz send me the link of github which includes complete MPU6050 with angle code.Shresta wrote:Its already implemented in the code on github - refer first post of this topic. There are functions in there, which will help you understand the conversion.USW wrote:Hello i need a way to convert the Gyro reading into angles. how can i do that
How do I change slave to 0x69 and what can i do if I want to access both the slaves ie 0x68 and 0x69 and read the DMP dataHello and Thank you for this exellent code i try it out with a RevB changed the busadress from 0 to 1
and for i have to change the slave also to 0x69 and it works also nice for me, to understand this awesome MPU.
Hi there - one option you've got is to do a "pi-duino" thing... I've done this on several projects using the Teensy 3.1 (arduino-compatible) to talk to hardware in real-time, sending the data over serial to the pi where the "smarts" live (pi can cache and accumulate data, do processing, send commands, etc. while the arduino side manages the hardware). When you need precise timing or a lot of PWM control, this way works pretty well. Serial comms are pretty easy to do as well since the Arduino libs make it easy to read and write and on the pi side you can just treat it like a file and plumb data in and out of it. Especially if you're already comfortable with arduino, this could be an option.Bararob wrote:Hej!
Nice work. I was wondering what highest logging frequency you get is. How hard world it be to log 1000 sampels a second and save the data to the sd. I have a Rpi and the mpu6050. I am coming from Arduino and not really sure where to start.