|
Re: Using MPU6050 through I2C bus
Quote:
Originally Posted by Joe Ross
I'm confused. The board you linked seems to be an a flight control board that contains an MPU6050 and an Arduino microcontroller. I've been looking at the MultiWii website and have not been able to find a description of the I2C interface. You'll need to find out what the I2c device address is, as well as the map of registers it supports. You may need to modify the Arduino firmware to get access to the data you want. I assume that there is some processing the Arduino is doing which is why you picked it, rather then using the MPU6050 directly?
Then you talk about pi4j, which implies you want to run java on a Raspberry PI. Does this mean that you want to connect the Arduino to a Raspberry PI and then the Raspberry PI to the I2C bus on the Digital Sidecar?
On the robot side, you'd use the I2C class in WPILibJ. The FPGA only supports being an I2C master, which isn't a problem if you are interfacing to the MPU6050 directly, but may be a problem if you are connecting to another controller that also is designed to be the master. There are several other gotchas to using I2C on the cRIO, so you should spend some time reading related threads on chiefdelphi.
|
The I2C interface is on the MPU itself and is visible in the picture on the hobbyking website I linked on the top of the green chip. We are hoping that it is possible to go directly from this MPU to the digital sidecar through this I2C port. I do not want to use a Raspberry PI, but I was wondering if that resource would at all be applicable to trying to interface the MPU directly to the sidecar.
__________________
[2017-present] FRC 0020 - The Rocketeers
[2016] FRC 5811 - BONDS Robotics
[2010-2015] FRC 0020 - The Rocketeers
|