Using the Bumper Switch with the EXP Controller (Team Freeze Tag)

I have followed all the steps to Assign the Drivetrain to Controller Joysticks according to the Google Doc directions within the Freeze Tag STEM LAB. I have also added my drivetrain, controller, and bumper devices to Code EXP. I can download the program and run it and the bumper switch works. When I try to use the controller everything works but when the bumper is pressed it does not stop. I included a picture of the code. What do I need to do to drive the codebase using the controller and have the bumper switch work when pressed? What am I missing?
Screenshot 2023-10-16 142046

1 Like

Hi @Tina_Dietrich! It looks like you’re using the {When started} hat block to Control the Bumper instead of the {When bumper pressed} block.

Here is an image of the code snippit from the STEM Lab.

It can also be found from this Team Freeze Tag rules document.

The purple blocks in this project control the colored rectangles that display on the Brain’s screen when the project is run. You can remove them if you don’t want to print the colors to the Brain’s display.

Let me know if this helps! :smiley:

1 Like

Screenshot 2023-10-16 150620

Would this be correct? I would connect the brain, then download it to the brain?

How do I get the controller to begin driving before hitting the bumper switch?

1 Like

That is correct, and you’ll have to place a [Wait] block between the [Stop driving] and [Controller enable] blocks to note how long the robot should stop when the Bumper Switch is pressed before it can start again.

If the Controller is set up in your device configuration, you should immediately be able to drive the robot using the Controller once the project is started.

Let me know if this helps :slight_smile:

2 Likes

I put in the code we discussed above, configured the controller, and downloaded the program. I pushed run on the brain and it says “calibrating inertial” . The controller doesn’t drive. I know I’m probably missing something very simple!

1 Like

Hello! Could you send me the project file so I can take a look? :smiley:

1 Like

When I try to upload the file it doesn’t let me upload exp formatted files.

1 Like

Sorry about that, let me check on the uploading capabilities.

Can you show me a picture of the code with the robot configuration open like I sent above? :slight_smile:

1 Like

After I download the program and unplug the brain the controller should be able to drive the robot? The controller doesn’t work at all.

1 Like

Hi @Tina_Dietrich! I actually replicated your issue :slight_smile: I’m talking with the software team now and I’ll keep you posted on what we find.

Thank you for finding this and letting us know!

1 Like

Hi @Tina_Dietrich! Good news, we found the issue and we’re working on fixing it for the next release of VEXcode EXP :smiley:

In the meantime, you can place an [Enable controller] block under the {When started} and it should work as intended.

Keep me posted once you try it!

1 Like

Everything worked! Thanks!

1 Like

Absolutely! :smiley:

1 Like

One of my students is having exactly the same problem, and we ARE using the code you have and all of my other students robots are performing perfectly??? any thoughts?

Hi @Karl_Topper! For the student that is having the problem, would you be able to send a video of the robot not performing as intended as well as an image of the code with the robot configuration window open? This can help us identify any issues :slight_smile: