Go to Post You can also always use the "Report Post" button on each post and that'll dispatch a carrier pigeon to each of our homes...or an e-mail if the carrier pigeons have taken the day off. - Madison [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 07-03-2006, 21:06
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Keeping a certain heading using a gyro

Hi all,

OK, I've been looking at Kevin's gyro code, and have been trying to work out an algorithm to maintain a certain heading using the gyro supplied in the kit.

My thoughts are leaning towards something like this:

Code:
Reset_Gyro_Angle();
if(Get_Gyro_Angle > 10){//1 degree
   turn left
}
else if(Get_Gyro_Angle < -10){//-1 degree
   turn right
}
else
   stop
Am I correct about the gyro values, where a positive value would be a turn to the right and a negative value would be a turn to the left?

And would this code (without optimizations) allow self adjustment to a certain heading (despite oscillations)?

Thanks,
__________________
 


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
Gyroscope Code Kevin Watson Programming 65 01-03-2008 23:46
Labview used to debug the Gyro joshR515 National Instruments LabVIEW and Data Acquisition 1 09-02-2006 20:56
Updated: Example Gyro Interface Code Kevin Watson Programming 2 28-03-2005 04:36
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32
Gyro Troubles SteveO Programming 13 30-01-2005 16:46


All times are GMT -5. The time now is 14:38.

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