I’m having trouble finding the accelerometer’s code for this year or last year’s Accelerometer.
Can someone tell me where it is?
Thanks, Tal
I’m having trouble finding the accelerometer’s code for this year or last year’s Accelerometer.
Can someone tell me where it is?
Thanks, Tal
I don’t know about the Code for the EasyC.
If you need it for the regular C then go here->2005 FRC code Repository
It’s somewhat old but you should be able to modify it. It has the full ADC code built it but it would be better if you take Kevin Watson’s ADC(new one not the 2005 one) code and integrate into it, this way you can use other analog sensors simultaneously.
Thanks. I tried to work on this code but I don’t know how to change it to work with dual-axis accelerometer (last year is dual-axis, but 2005 has only one axis…).
Can someone help us by publishing the accelerometer code that is modified to work with the dual-axis accelerometer?
P.S.
Kevin said last year that he will publish the code, but I can’t seem to find it either.
Thank you for your help.
Tal, Neat-Team
JFYI: easyC has the code built in.
If you’re trying to use the sensor to measure tilt relative to the gravity vector, just use the ADC code to measure the outputs. Remember to take into account the ~2.5 volt bias. I have some code floating around here somewhere that shows how to derive tilt from the two outputs. I’ll have a look and post what I’ve got.
-Kevin
Have a look at the attached code. You’ll also need to get a copy of the ADC code from my website.
-Kevin
accels.c (1.52 KB)
accels.h (1.82 KB)
accels.c (1.52 KB)
accels.h (1.82 KB)
If you’d like, I also developed some code for using the accelerometer (for tip sensing or for position/velocity sensing). The code can be found in my old post here:
It works with Kevin’s 2006 ADC code so you can use it with other analog sensors. I’m currently working on modifying it to support dual and triple axis accelerometers for our robot this year, I’ll post up the new versions when I have them finished.