Go to Post I am definitely not a battery or battery charging expert (far from it) but I do know enough to be dangerous (I stayed in a Holiday Inn Express last night)... - Don Wright [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 25-10-2007, 19:11
diaperrash89 diaperrash89 is offline
Registered User
no team
 
Join Date: Oct 2007
Location: Illinois
Posts: 5
diaperrash89 is an unknown quantity at this point
Bumper Sensor Question

Hello,

We finally got our vex robots up and running and we've just done some pretty basic programming right now. So far our school has just a few sensors, bumpers being one of them. While we're just kicking off this robotics program, we're not so sure how to program the bumpers. I know how to put in the digital input and what not. Do we just have to tell the bumpers to get the digital input? Basically we want to tell it if the bumper is pushed, go the other way.. Advice? thanks.
  #2   Spotlight this post!  
Unread 25-10-2007, 23:09
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: Bumper Sensor Question

Quote:
Originally Posted by diaperrash89 View Post
Hello,

We finally got our vex robots up and running and we've just done some pretty basic programming right now. So far our school has just a few sensors, bumpers being one of them. While we're just kicking off this robotics program, we're not so sure how to program the bumpers. I know how to put in the digital input and what not. Do we just have to tell the bumpers to get the digital input? Basically we want to tell it if the bumper is pushed, go the other way.. Advice? thanks.
Check out the Programming section of the Vex Inventor's Manual, which is available as a PDF download from the Vex programming page at Vex Labs. This PDF is a great introduction to using Vex sensors with EasyC, and has specific examples of code that makes a robot back up if it something hits the bumper switch.
__________________
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

世上无难事,只怕有心人.
  #3   Spotlight this post!  
Unread 26-10-2007, 06:17
Chief Pride's Avatar
Chief Pride Chief Pride is offline
<3
AKA: James Kiefer
no team
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Kalamazoo, MI
Posts: 653
Chief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond reputeChief Pride has a reputation beyond repute
Re: Bumper Sensor Question

get digital input into a variable, the variable will be an unsigned char, then if the value of the variable is 1, the button is pushed, if it is 0, it is not
  #4   Spotlight this post!  
Unread 26-10-2007, 06:48
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Bumper Sensor Question

Here is a screen shot of a Limit Switch test I had done. (I'm assuming you're using easyC for Vex.) Limit Switches are the same as Bumpers, just more sensitive and less durable, and the pretty easyC icon is different. The limit variable is an int. Change Digital Input number to suit, add PrintToScreen's to test the alternate conditions, and add SetMotor's to taste.

If I remember, there was some code that, if front bumper was hit, drive motors backwards and turn left 90 degrees, else let the driver drive the motors.

And, yes, check out the Vex PDF for the full explaination. I just get impatient reading it sometimes.

Last edited by Roger : 04-09-2008 at 08:43.
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
Bumper Question - More like Pool Noodle bLuEpHoEnIx Technical Discussion 5 12-02-2007 21:33
bumper question math4origami Rules/Strategy 4 16-01-2007 14:47
Question about programing the bumper sensors itsme Programming 9 10-12-2006 18:03
NPN Sensor Question Mr. Steve Programming 2 17-02-2006 00:05
IR sensor question Daniel Brim Programming 1 18-01-2004 14:35


All times are GMT -5. The time now is 01:22.

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