View Full Version : Accelerometer Code
Smoking_Gun
21-01-2007, 09:45
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 (http://kevin.org/frc/)->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.
Smoking_Gun
24-01-2007, 08:33
I don't know about the Code for the EasyC.
If you need it for the regular C then go here (http://kevin.org/frc/)->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 (http://www.chiefdelphi.com/forums/showpost.php?p=430290&postcount=10) 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
Kingofl337
24-01-2007, 09:09
JFYI: easyC has the code built in.
Kevin Watson
24-01-2007, 10:41
P.S.
Kevin said (http://www.chiefdelphi.com/forums/showpost.php?p=430290&postcount=10) last year that he will publish the code, but I can't seem to find it either.
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
Kevin Watson
24-01-2007, 10:54
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.
-KevinHave a look at the attached code. You'll also need to get a copy of the ADC code from my website.
-Kevin
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:
http://www.chiefdelphi.com/forums/showpost.php?p=547382&postcount=5
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.