Go to Post I watch students push themselves beyond their limits every year only to realize they have yet to find their true limits. - JesseK [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 01-12-2007, 23:35
MRClark MRClark is offline
Registered User
AKA: Matt Clark
FRC #0228 (GUS 228)
Team Role: Student
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Wallingford CT
Posts: 3
MRClark is an unknown quantity at this point
Send a message via AIM to MRClark
Catapult Programing Help

Can someone please help me wit the programing of a catapult i built

it is tanks style drive
3 motors driving tank on each side
2 motors driving the catapult
2 limit sensors to tell me when the arm is up and down

the problem i am having is that the arm comes down way to hard and because i manually have to reload the tennis ball every time, i want it th have a switch on the robot so once the arm has been fired, it will stay out until the button has been pressed, so i can let it down softly
can someone please help me put this into code?
__________________
Think. Create. Build. Amaze. VEX.

GUS
Team 228


My Pictures
  #2   Spotlight this post!  
Unread 01-12-2007, 23:42
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Catapult Programing Help

Do you have a picture of the robot?
  #3   Spotlight this post!  
Unread 02-12-2007, 15:33
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,270
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Catapult Programing Help

Quote:
Originally Posted by MRClark View Post
Can someone please help me wit the programing of a catapult i built

it is tanks style drive
3 motors driving tank on each side
2 motors driving the catapult
2 limit sensors to tell me when the arm is up and down

the problem i am having is that the arm comes down way to hard and because i manually have to reload the tennis ball every time, i want it th have a switch on the robot so once the arm has been fired, it will stay out until the button has been pressed, so i can let it down softly
can someone please help me put this into code?
We can't write code for you. We would need a lot more information to tell you what to write for code.

If you just want ideas the try either reducing the speed of the arm as it returns or try replacing the limit switches with potentiometer and used PID control to let the arm slow down as it returns.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #4   Spotlight this post!  
Unread 02-12-2007, 16:07
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Catapult Programing Help

Quote:
Originally Posted by MRClark View Post
Can someone please help me wit the programing of a catapult i built

it is tanks style drive
3 motors driving tank on each side
2 motors driving the catapult
2 limit sensors to tell me when the arm is up and down

the problem i am having is that the arm comes down way to hard and because i manually have to reload the tennis ball every time, i want it th have a switch on the robot so once the arm has been fired, it will stay out until the button has been pressed, so i can let it down softly
can someone please help me put this into code?
So you want to use the limit switches to stop the arm from driving?

The tank drive part isn't hard. First, get the value from two joysticks (I always use tank mode as opposed to arcade) on the transmitter, and store these two two different variables, like leftDrive and rightDrive. Then, use a bunch of SetPWM() functions to set the PWM motors to these values. If you have to invert the values to get the motors to spin the right direction, for example the rightDrive, you can use an assignment of rightDrive = 255 - rightDrive;

To drive the motors for the arm, you would do exactly the same as before, with one modification. Before you actually set the drive motors, check the limit sensors first. Let's say that 0 makes the arm go down, and 255 makes the arm go up. If the bottom limit switch is pressed, and the value you want to send to the motor is less than 127, overwrite the variable with 127. Then you can use SetPWM(); to drive the motor. This way, the arm can only stay put or go up if the lower limit switch is pressed. You would do a similar thing for the upper bound, just inverted.

And if you want to make it drive slower, you can take the raw value coming in from the transmitter, subtract 127, multiply* it by coefficient between 0 and 1, then add 127 back to it.

* Because the Vex controller normally only likes to deal with integers, if you want to get 60% of a value, use something like someVariable = someVariable * 6 / 10;
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
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
Programing Help Tt321b Programming 4 19-01-2006 00:22
C programing help needed crimsonsamuri Programming 4 19-10-2005 04:32
programing error help tellsomebody Programming 0 29-01-2005 13:49
Programing Help again... archiver 2000 3 23-06-2002 22:47
Programing help... archiver 2000 9 23-06-2002 22:46


All times are GMT -5. The time now is 09:31.

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