Finaly I have the time to post my current Razor 9DOF IMU 100hz firmeware source code.
Some things you will have to do and also keep in mind before uploading my code to your own IMU:
- use only on the same IMU hardware version or make sure it's compatible to mine.
- use only at your own risc! :)
- make sure your arduino i2c works @ 400kbps. Check this howto. (find twi.h change speed)
- I compiled my sketch with arduino v0.22. Other arduino versions migth give errors while compiling and/or will give less performance (fps).
- after uploading my firmeware to the IMU you can't read the output with arduino serial monitor. So you will have to test the output with another arduino board or a pc application that can handle 250kbps serial communication.
- I have changed the output function to get beter performance to my own needs. Output is DCM Euler angles and Raw Gyro data. Currently in my PID calculations I use DCM euler angles in my P term and use de raw gyro data in my D term.
- Notice that my output is euler_angle*100. When using this value you will first need to divide it by 100. Also consider that maybe you will have to inverse some of my values in your own application.
If you would first like to test my firmware with the arduino serial monitor, you just have to change the serial baud rate to 115200. Then you can read the output string with the arduino serial monitor. Notice that you will not have 100hz (fps) when using the serial on 115kbps.
download the firmware: SF9DOF_AHRS_WIPO.zip
Geen opmerkingen:
Een reactie posten