Go to Post How are you planning to teleport balls? Or your robot? I was pretty sure that the battery couldn't supply the required power draw. - RoboChair [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2007, 09:45
Smoking_Gun Smoking_Gun is offline
Registered User
AKA: Tal
FRC #1943 (Neat-Team)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: israel
Posts: 11
Smoking_Gun is an unknown quantity at this point
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
  #2   Spotlight this post!  
Unread 21-01-2007, 15:35
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: Accelerometer Code

Quote:
Originally Posted by Smoking_Gun View Post
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.

Last edited by 6600gt : 21-01-2007 at 15:41.
  #3   Spotlight this post!  
Unread 24-01-2007, 08:33
Smoking_Gun Smoking_Gun is offline
Registered User
AKA: Tal
FRC #1943 (Neat-Team)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: israel
Posts: 11
Smoking_Gun is an unknown quantity at this point
Re: Accelerometer Code

Quote:
Originally Posted by 6600gt View Post
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
  #4   Spotlight this post!  
Unread 24-01-2007, 09:09
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Accelerometer Code

JFYI: easyC has the code built in.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 24-01-2007 at 09:21.
  #5   Spotlight this post!  
Unread 24-01-2007, 10:41
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Accelerometer Code

Quote:
Originally Posted by Smoking_Gun View Post
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
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 24-01-2007, 10:54
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Accelerometer Code

Quote:
Originally Posted by Kevin Watson View Post
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
Attached Files
File Type: c accels.c (1.5 KB, 98 views)
File Type: h accels.h (1.8 KB, 86 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 24-01-2007, 13:57
Donut Donut is online now
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,302
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
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.
__________________
FRC Team 498 (Peoria, AZ), Student: 2004 - 2007
FRC Team 498 (Peoria, AZ), Mentor: 2008 - 2011
FRC Team 167 (Iowa City, IA), Mentor: 2012 - 2014
FRC Team 2662 (Tolleson, AZ), Mentor: 2014 - Present
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone has code for accelerometer? sjung9442 Programming 2 30-01-2006 21:37
Accelerometer code?! David55 Programming 2 25-01-2006 01:15
Accelerometer code ImmortalAres Programming 28 04-06-2005 01:02
Some things i'm trying to understand on Kevin's Accelerometer Code Squall Programming 2 03-02-2005 12:01
Example accelerometer code released. Kevin Watson Programming 0 20-01-2005 03:45


All times are GMT -5. The time now is 03:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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