i2c protocol for MPU-6050 sensor

Applications, development tools, FPGA, C, WEB
Post Reply
f_sat
Posts: 8
Joined: Thu Mar 23, 2023 6:31 pm

i2c protocol for MPU-6050 sensor

Post by f_sat » Thu Mar 23, 2023 6:59 pm

Hi, I'm new to Red Pitaya, so far I've done some very simple examples and they work but I ran into a problem when I wanted to use the i2c protocol to get data from a MPU-6050 sensor (gyroscope and accelerometer), I've seen the example of use of i2c that works by default in the examples (in C), but there they make use of the internal EEPROM memory, I wonder if anyone has any basic example of how to read data from an external sensor connected to the SDA and pins SCL from the pitaya network, I'm not looking for anything fancy just how I can detect and get the sensor data.

First of all, Thanks.

earlforeal
Posts: 33
Joined: Thu Aug 20, 2020 9:00 pm

Re: i2c protocol for MPU-6050 sensor

Post by earlforeal » Thu Jul 13, 2023 10:25 pm

I am trying to interface with a DS3231 RTC via i2c. Like you, all the examples work, but there are noo examples showing how to interface with i2c sensors. I've had no luck trying to modify the examples either. :|

User avatar
redpitaya
Site Admin
Posts: 880
Joined: Wed Mar 26, 2014 7:04 pm

Re: i2c protocol for MPU-6050 sensor

Post by redpitaya » Tue Jul 18, 2023 12:21 pm

You can take a standard driver for a sensor and change it so that it uses Red Pitaya i2c functions and registers.

Try to modify the existing C code examples and use functions in the rp.c as a guideline:
https://github.com/RedPitaya/RedPitaya/ ... Examples/C
https://github.com/RedPitaya/RedPitaya/ ... i/src/rp.c

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 22 guests