Log in

View Full Version : Using KOP Gyro on Arduino?


pastelpony
20-12-2014, 23:05
I'm trying to get an angle reading from it, but I cannot find any libraries or code for it. Can someone help? Thank you.

dellagd
21-12-2014, 01:25
You don't need a library. After doing this maybe you could even help out the community by writing your own.

Did you already check out the data sheet? I assume you're talking about this one (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2012_Assets/Accelerometer-Gyro.pdf).

If you scroll down to the section on the Gyro it tells you how the sensor works. For starters you should be connecting it up to +5v and ground, and then connecting both the temperature and rate to analog inputs on the arduino. The datasheet then tells you everything you need to know for sensing the rate of change of the robot's angle. Integrate that in your code to get the angular displacement.

I think you learn more by figuring it out on your own, I know I have, so if you need any more pointers I'll point you in the right direction :D


If you want more help this page (http://playground.arduino.cc/Main/Gyro) will detail pretty much what you have to do, minus any temp stuff. I'm hoping you already found this though since I just googled "arduino gyro"...