Hi,
I'm trying to write a user C module to use a MPU6050 in my custom board. This custom board has a STM32F407VGT6 MCU on it.
I want to write data to the MPU6050 and read data from it, using I2C functions. Where is a good place to start looking?
I've seen the file i2c.c and its functions (i2c_write, i2c_writeto, i2c_read, i2c_readfrom), and I looked at machine_i2c.c and its functions (read_mem, write_mem, mp_machine_i2c_writeto, mp_machine_i2c_readfrom). Which of these functions are the ones I should use to communicate my MCU with the sensor?
Thanks in advance!
Which I2C functions should I use to create a user C module for MPU6050?
-
- Posts: 5
- Joined: Wed Feb 24, 2021 7:34 pm
- Location: México
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Which I2C functions should I use to create a user C module for MPU6050?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 5
- Joined: Wed Feb 24, 2021 7:34 pm
- Location: México
Re: Which I2C functions should I use to create a user C module for MPU6050?
Thank you! But this is a micropython module, what I want to do is to write a user C module (for educational purposes) for the MPU6050 for my custom board, and I don't know exactly which I2C functions should I use to make this.