Welcome to:
If you read my previous blog post, you would know that I've been trying to interface an MPU6050 gyroscope/accelerometer for a PID controller for the code.
This is the GY88 module that has the MPU6050 IC on it. It's pretty awesome. Also really hard to read data from it in Python :((
Problem is, there's not a lot of support for I2C devices through Python's implementation of the Firmata communication protocol, PyMata. It involves mapping the individual registers and trying to find the right value of the accelerometer/gyroscope within that whole low-level mess. In fact, I spent the entirety of last month just trying to figure out how to read data from the sensor.
But then the Internet happened. And so did Johnny-Five.
Johnny-Five is basically the best thing that has ever happened for the code for the robot. The Johnny-Five platform is based on Firmata, which already plays perfectly into our whole control scheme. It has built-in support for the MPU6050 chip, and I can read the data from the sensor in a matter of seconds. There's even a PID controller library that will do all the math for me when I program the auto-stabilization algorithm.
It's amazing.
So now the code is kind of a mix between Python and Javascript. We're using the inputs library in Python to get XBOX values because it's amazing and not noisy at all (ahem Javascript developers please make an actually working XBOX module thank you), but then using Node.js and Johnny-Five to get sensor data and make the ROV's movement a lot more precise.
Our second pool test is scheduled for February 15th, so stay tuned...
No comments:
Post a Comment