|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Bumper Sensor Question
Quote:
|
|
#3
|
|||||
|
|||||
|
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
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |