Announcement

Collapse
No announcement yet.

Trying to play battle bots using bumper switch to kill controller..?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to play battle bots using bumper switch to kill controller..?

    In my vex class we are trying to play battle bots. I want stop the controller from working when the bumper switch is pressed. We are only using graphical at this time. Please help...
    Thank You...

  • #2
    Instead of a forever Loop put the driver controls in a repeat until Loop. Then have it run until the bumper is hit.

    Comment


    • #3
      Thanks, I believe we tried that already, but I will try again.

      Comment


      • #4
        Something like this should do it.

        Comment


        • #5
          Thanks...Any Idea how to do the same thing except with 2 bumper switches..?

          Comment


          • #6
            I suggest assigning a variable, call it "BUMPED", before the loop starts, with an initial value of false. Have the "while" loop test for "BUMPED" = false. Inside the loop, test for either bumper being true, and if so, make "BUMPED" = true, so the loop will exit.
            Last edited by IJeepIt; 01-30-2018, 09:19 PM.

            Comment


            • #7
              Can you post a pic of this in graphical robotc? Thanks..

              Comment


              • #8
                Here you go. I tested this, and motors stop when either button is pressed.

                Click image for larger version

Name:	bumped.jpg
Views:	2
Size:	77.6 KB
ID:	1482
                Attached Files

                Comment


                • #9
                  ltpro1997, would you mind posting the code that you mentioned you tried but didn't work?

                  Comment


                  • #10
                    Sorry, I wiped it.
                    The code you showed worked great. Thank you

                    Comment


                    • #11
                      Would you mind sharing a photo or a blueprint of your bumper bots? I'd like my post-season teams to build me few for a school demonstration so kids can have some fun when learning about the program....

                      Comment

                      Working...
                      X