View Single Post
  #3   Spotlight this post!  
Unread 22-01-2006, 00:04
Goldeye Goldeye is offline
Registered User
AKA: Josh Hecht
FRC #0694 (Stuypulse)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2005
Location: New York
Posts: 145
Goldeye has a spectacular aura aboutGoldeye has a spectacular aura aboutGoldeye has a spectacular aura about
Send a message via AIM to Goldeye
Re: Programming Questions

Quote:
Originally Posted by magical hands
1) The accelerometer gives the acceleration in "milligs" anyone knows how they are deriving this acceleration equation plus what is "milligs" because i know that acceleration is measure in m/s^2 but haven't heard of "milligs".

2) Also, Anyone knows how can i get distance from the milligs unit?

3) Also, if i want to fuse Kevin's 2006 accelerometer code, 2006 gyro code, and and the CAM code how would i do it?

4) Any one knows how to wire the photoswitch sensors all i see is 2 wires sticking out of the sensor how would i connect it to RC? and where Digital or Analog?
1. A g, the acceleration due to gravity is about 9.80665 m/s^2. A millig is one thousandth of that, or 0.00981 m/s^2.

2. You need to integrate twice. Basically, that looks like this.
Code:
int velocity;
int position;

int accel = /*Get the acceleration from the accelerometers */
velocity += accel * TIME; /*TIME is how frequently the timer you are running the interrupt on is called.  If you're alternating the gyro and accelerometers, this'll be timer time / # of things you're checking. */
position += velocity * TIME; /*With the gyro, you may actually need to be doing some trig to do this the way you want */
3. You need to fiddle with stuff in adc.h (taken from the gyro code). The challenge is all about figuring out what, exactly. I don't remember exactly what's in there, but ask more here if you have trouble.

4. There's two parts. One's a receiver, one's the source. What we did was have them share power and ground, and you only need to use one of the two signal wires on the receiver. However, there's some weird thing that needs to be done to it to send 5v (It sends 0.01 if you just solder it.) I wasn't involved in that though. I'll try to find out for you.
__________________
Team 694

2005 Championship - Galileo Semifinalist
2005 New York - Regional Chairmans Award
2005 New York - Semifinalist (Thanks 1257,1340)