Hi,
My final project goal is to make Brushless gimbal for drones using only Arduino MEGA 2560 and 9DOF IMU for control. On Instructables I found two excellent tutorials. Both are different than mine in selected components.
I use the following components:
Arduino MEGA2560
[Motors - Quanum 2208 Precision Brushless Gimbal Motor
[Motor Driver - H bridge L298n
I’m stuck with 9DOF Razor IMU. Surfing on the internet I found a great tutorial on [github repository . This tutorial is excellent and AHRS works great with the FTDI Basic Breakout 3.3V. They gave me a good starting point, but my goal is use only Arduino MEGA2560 and sensors.
I want to connect the Arduino and 9DOF IMU directly and use the accelerometer data (Yaw, Pitch, Roll) for directly control the engines. On the website of the manufacturer [Sparkfun I can’t find any datasheet exclusively for 9DOF IMU that could help me to connect Arduino and IMU. There are only datasheet of sensors that are on IMU ( ITG-3200 (MEMS triple-axis gyro), ADXL345 (triple-axis accelerometer), and HMC5883L (triple-axis magnetometer) which are useless for me.
That’s why I decided to use code from [this site and he works great. I connected everything as is in tutorial and Arduino SerialMonitor show me the desired values YPR. Values load very quickly directly from IMU and printed on SerialMonitor.
Values on SerialMonitor looks like this:
#YPR=72.13,1.74,-16.38
#YPR=72.14,1.72,-16.39
#YPR=72.12,1.71,-16.39
#YPR=72.13,1.71,-16.37
#YPR=72.13,1.70,-16.40 …
HELP ME
This is my first solo Arduino project and I have a lot of questions about it.
How could I parse the data that appears on SerialMonitor to get new variables eg. Yaw = 72.12, Pitch = 1.74, Roll = -16.39?
Is it possible to do that?
Does anyone have any experience with 9DOF razor IMU and maybe know better way to collect information from the accelerometer 9DOF razor IMU?
I want to achieve three separate variables which i will use to control the brushless motor. I think this should be an easier method as it is just comma separated numbers but then again i am new to arduino serial communication so i would appreciate any help with this. Even if it’s only how to parse and extract the values.](https://goo.gl/zOnYjN)](https://goo.gl/myg9oj)](https://goo.gl/jh2pfU)](https://goo.gl/myg9oj)](https://goo.gl/A4ZQi5)](http://goo.gl/RDBvJL)