Skip to main content
Skip to Main Content
Skip to main content
Navigation

Using the VEX EXP Bumper Switch

Watch this video from our VEX EXP STEM Lab, Team Freeze Tag, to learn about the Bumper Switch and how to configure this device in VEXcode EXP. 

(upbeat music)

Welcome back to the VEX Classroom. In this video, we're gonna be talking about Using the Bumper Switch. So, we're gonna go over what a Bumper Switch is, how to configure the Bumper Switch in VEXcode EXP, and also look at a couple of examples of using the Bumper Switch with a robot.

To start with, we're gonna talk about what a Bumper Switch is. A Bumper Switch is a mechanical device used for EXP. It's a simple mechanical device that reports whether it is pressed or not pressed. If we look here at the Bumper Switch that I have, you can see pressed, not pressed. That's just a very gentle touch that's able to trigger the device to report whether it's pressed or not pressed. This is a three-wire device. You'll see that it has a white, red, and black wire, and that's what's being used to report to the EXP brain whether it is pressed or not pressed, or a value of zero or one, since this is a digital device.

Now, in order to use a Bumper Switch, you want to think about what you want to accomplish with the Bumper Switch with your robot. There are a lot of things you can do with the Bumper Switch in order to mount it. I have a C channel here; the Bumper Switch actually just slides right inside of that C channel if you wanted to mount it that way. It's a perfect size for that. Also, if you want to do it in the opposite direction, you can see there are these slots on either side of the Bumper Switch, so that you can put it on any piece of metal and actually use screws and thread them through the holes there.

(metal clutching)

If you want the most steady option, you can see here I actually have one at the top and one at the bottom. These opposite screws are gonna keep your Bumper Switch in one place. This is the steadiest way to mount it. However, if you're testing out designs of whether you need it to be a little higher or a little lower on your robot, you can actually put them both on one side. If I put them both in the top option here, you can see they're parallel to one another, these two screws. I can actually slide my Bumper Switch up and screw them in. So, I could mount it a little higher or, if it's the opposite direction, a little lower, or even get into some diagonals too. This is a really good way to test the mounting location of your Bumper Switch by keeping the two screws parallel to one another in those same holes. That way, you can test what the best mounting location is.

On this EXP robot I have here, I have them both in that top position. If I wanted to see what it would be like to shift it up a little bit, I could do that. One other option, when you're looking at mounting your Bumper Switch and just a few general features of the Bumper Switch, is that in this top here, you can actually remove this screw. When you remove this center screw, you can take off this piece, and you'll see there's another mounting insert inside of here. You could put another panel on top of that if you want to extend the contact location of the bumper. You could put a whole plate here and mount it on, and you can still press it and get that response back from the Bumper Switch.

So, we talked a little bit about what the Bumper Switch is and how you can mount it on your robot. Next, let's look at configuring it in VEXcode EXP. Then we can talk about how you can really use the Bumper Switch with your robot with some examples.

Here I have VEXcode EXP open. What I want to do first in order to configure the Bumper Switch is to go to the Devices window. You can see I already have my drive train configured here. This is a base bot configuration that I have, but whatever robot you're using, you want to make sure the drive train matches, and I'm gonna add a device. As I mentioned briefly, the Bumper Switch is a three-wire device.

Thank you for watching this video on using the Bumper Switch. We hope you found it informative and helpful. If you have any questions or need further assistance, feel free to reach out.

Stay tuned for more videos from the VEX Classroom. Happy building!

So, if I look at the one that's mounted on my robot, you'll see again, the black, red, and white wires. It tells me it's a three-wire and it's mounted, inserted on the top of the EXP brain. So, I'm gonna go, I'm gonna select Three-Wire. And then we have Bumper right up here at the top, and we need to select our port. You'll also notice three-wire devices are indicated by triangles in our devices as well. So, I have this in port A. If you wanted to rename it, you could, but I'm just gonna keep going. And if I select Done, I can actually see a couple of blocks appear in VEXcode that I can use with the Bumper Switch.

The first is a sensing block. So, if I look over here, we have bumper pressed. Let's zoom in a little bit, so we can see that a little better. So, this is the bumper pressed Boolean block. This will report a true or false value of whether the bumper is pressed or not pressed. This can be used with blocks like wait until that have that hexagonal opening in the blocks to say wait until the bumper is pressed then start driving or wait until the bumper is pressed then stop driving or lift the claw, lower the arm, something along those lines. There's different options that you can then use the Bumper Switch to trigger another behavior of your robot with this bumper pressed Boolean block.

Another option for blocks is actually an event block. So, if we go up to Events, we have the when bumper pressed hat block. So, this is the same concept, when the bumper is pressed, any blocks that are attached beneath it, all of the blocks in that stack will run. So, we're gonna go ahead and look at a couple of examples of these projects in action.

Okay, in VEXcode I have a project, so that the robot will drive forward, until the bumper is pressed and then stopped driving. For this, I mounted the bumper sensor on the front of my robot. So, I have the C channel here, the Bumper Switch is attached to the front of that C channel. And the robot will drive forward, until the bumper presses against this wall and then stopped driving. I already have this downloaded on my brain. So, let's go ahead and run it and see how it works.

(robot whizzing)

The robot is gonna drive forward, press the bumper against the wall, and then it stops driving. So, now this project here has the exact same function as the previous project, when started the robot will drive forward. And then when the bumper is pressed, that second hat block will run all the blocks beneath it, which in this case is a stop driving. So, same functionality, but a couple of different blocks used. Let's go ahead and test it out on the robot. Again, this has already been downloaded.

(robot whizzing)

It can drive forward, press the bumper against the wall, and then stop driving.

So, so far we have talked about what a Bumper Switch is, which is a simple mechanical device that reports whether it is pressed or not pressed. This is a three-wire device for VEXcode EXP. To configure it in VEXcode EXP, you'll go to the Devices window, select Three-Wire, Bumper, and then choose what port that your Bumper Switch is plugged into. And then in order to use the Bumper Switch, you can use some of the blocks that we talked about, like the bumper pressed Boolean block, or that bumper pressed hat block that's part of the events.

These are just some of the ways that you can use the Bumper Switch. There are many more ways that you can go through and use this, whether it be to press when you move to an object and it presses against the object and then maybe your claw closes around that object if your bumper's inside the claw. You could also use it to detect when your arm has lowered to its home position, so it's pressing down on the bumper. There's really so many options to use with the Bumper Switch.

Cannot wait to see what you come up with, with your robot. And we will see you next time.

(upbeat music)

Share

Like this video? Share it with others!

Additional Resources

View the following resources related to the concepts covered in the video as you continue your learning. 

Like this video? Discuss it in the VEX Professional Learning Community.