Announcement

Collapse
No announcement yet.

Robot Moves by itself with a controller program

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

  • Robot Moves by itself with a controller program

    How would you set up a threshold system like you can in ROBOTC in Modkit. When you have a driver control program sometimes the robots move by them selves. In ROBOT C you can set the throttle threshold to 10 so it will not move until the joystick is past the value of 10, preventing the robot from moving by itself.

  • #2
    Hey Mr. Biggs~

    I do this all the time! You just need to nest operators -
    the green blocks. You'll find that they are all oval in shape, so they can be used as values within one another.

    This is my quickest / easiest method:

    FOREVER
    IF joystick A is < 10 AND joysick A is > -10
    Set velocity to 0
    Else, set velocity to Jotstick A, spin forward.

    Since the joystick values range from -100 to 100, a forward velocity of, say, negative 25 would be the same as spinning in reverse at 25 rpms. Forward and reverse handled in just a few blocks!

    All that remains is tweaking the threshold values within the first IF.

    (Let me know if you need a screenshot, and I can probably post one tomorrow (Friday).

    Happy coding and best of luck!

    ~Vexatron
    Last edited by Vexatron; 03-02-2018, 09:33 AM.

    Comment


    • #3
      Screenshot attached.

      ~Vexatron

      Comment


      • #4
        Awesome thank you.

        Comment

        Working...
        X