Go to Post "Scientists investigate that which already is; Engineers create that which has never been." - Albert Einstein - JamesCH95 [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 08-04-2003, 09:28
odin892 odin892 is offline
Registered User
#0892 (team ASCII: All Students Challenging Intellect and Ingenuity)
 
Join Date: Apr 2003
Location: canal winchester, Ohio
Posts: 11
odin892 is an unknown quantity at this point
gyro code

we used a gyro to balance our arms but the gyro would return to center after about a second or two so we made a pendulum.
here is our code before we took it out. you may need to tweak some variables.

If p3_sw_top = 1 then
If p3_y > 127 then
If balancing_motor_limit_forward = 0 then balancing_motor = p3_y
else

if p3_y < 127 then
if balancing_motor_limit_reverse = 0 then balancing_motor = p3_y

endif
endif
else
If state = 0 then
balancing_motor = 183

If balancing_motor_limit_forward = 1 then balancing_motor = 127

If gyro => 180 then state = 1

else

If state = 1 then
balancing_motor = 63

If balancing_motor_limit_reverse = 1 then balancing_motor = 127

counter = counter + 1
If counter => 30 then
state = 2
endif
else
If state = 2 then balancing_motor = 127

endif
endif
endif
  #2   Spotlight this post!  
Unread 08-04-2003, 10:47
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Are you asking a question, or offering your code for others to use?
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #3   Spotlight this post!  
Unread 08-04-2003, 14:50
odin892 odin892 is offline
Registered User
#0892 (team ASCII: All Students Challenging Intellect and Ingenuity)
 
Join Date: Apr 2003
Location: canal winchester, Ohio
Posts: 11
odin892 is an unknown quantity at this point
i was offering code to other to use. it was supposed to be a reply but i clicked the wrong button and didn't realize.
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
What is your most prefered programming language? Hailfire Programming 156 19-01-2005 21:42
Autonomous code PBoss Programming 7 14-01-2003 15:29
Does your team use the Default code. Jeff McCune General Forum 2 09-01-2003 14:46
Gyro Chip Code archiver 2001 4 24-06-2002 00:57
[white paper] Auto-Balance Gyro Code Brandon Martus Technical Discussion 3 21-06-2001 10:36


All times are GMT -5. The time now is 15:33.

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