Announcement

Collapse
No announcement yet.

Motor power adjustment

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

  • Motor power adjustment

    Is there a way to limit a motor power to .5 in blocks programming when using the left and right stick?

  • #2
    You can multiply the joystick value by 0.5 (to use the full joystick range of motion, or you could use the Clip block to clip the value between -0.5 and +0.5

    Comment


    • #3
      We we ould like to use the full range, which blocks would we add to multiply the value by .5?

      Comment


      • #4
        Check out the math blocks... Do some basic experimentation. Read the help tips and Explore.

        Comment


        • #5
          OK, spent hours "experimenting" and couldn't figure it out. Here is our code. We know we need to change the "tgtpower" to our armmotor but cannot figure out how. Now of the wiki articles we found explain how to do this. first op mode.pdf

          Comment


          • #6
            In the math section

            From - page 47 http://www.ortop.org/ftc/BlocksProgr...enceManual.pdf

            ← x Description: Multiply the 1st numeric value by the 2nd numeric value

            so
            set tgtpower to tgtpower * 0.5

            or page 48 is the clip function they call constrain

            Description: Compare the 1st numeric value to the 2nd and 3rd. If the 1st is less than the 2nd, return the 2nd. If the 1st is greater than the third, return the 3rd. Otherwise return the 1st

            1st value -- tgtpower
            2nd -- -0.5
            3rd -- 0.5

            set tgtpower to constrain tgtpower low -0.5 high 0.5

            Comment


            • #7
              thank you so much! worked perfectly!

              Comment

              Working...
              X