Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Accelerometer Code (http://www.chiefdelphi.com/forums/showthread.php?t=52430)

Smoking_Gun 21-01-2007 09:45

Accelerometer Code
 
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

6600gt 21-01-2007 15:35

Re: Accelerometer Code
 
Quote:

Originally Posted by Smoking_Gun (Post 561749)
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.

Smoking_Gun 24-01-2007 08:33

Re: Accelerometer Code
 
Quote:

Originally Posted by 6600gt (Post 561934)
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

Kingofl337 24-01-2007 09:09

Re: Accelerometer Code
 
JFYI: easyC has the code built in.

Kevin Watson 24-01-2007 10:41

Re: Accelerometer Code
 
Quote:

Originally Posted by Smoking_Gun (Post 564064)
P.S.
Kevin said 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

Re: Accelerometer Code
 
2 Attachment(s)
Quote:

Originally Posted by Kevin Watson (Post 564129)
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

Donut 24-01-2007 13:57

Re: Accelerometer Code
 
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/sh...82&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.


All times are GMT -5. The time now is 17:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi