Hi, I am trying to write a PID that uses both encoders and a gyro mounted on the robot to control our auto code. I hope to be able to turn to a specific degree, continue in a straight line (self-correcting of course) or return to a specific heading after going over or around something. Just as a note I have never successfully written a pid subsystem before and have never used sensors other than encoders and limit switches. Due to this, I am not sure where to start and what I need to know.
Later in the year, I am hoping to have access to a NavX-MXP but that is weeks away. Currently what I am hoping to use is ADXL345 (gyro/accel) but the information on Analog Devices website does not match the product. So, I am hoping to learn more about sensors in general, what all the abbreviations mean, how to wire it and where to wire it to (ic2, analog…). There is a picture of it attached here: https://drive.google.com/file/d/0B-EpXT6X2A5hQVIyZGRHWDdRbWc/view?usp=sharing
Please let me know if you have example code, information or anything, it all will help.
Thank you,
~Walker Ward~