Announcement

Collapse
No announcement yet.

trying to program a hold when lifting arm

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

  • trying to program a hold when lifting arm

    my kids are pretty new to programing and they are having trouble with their arm on their bot. the arm won't stay raised unless they hold the button down on the remote continuously. is possible to add in extra code to tell the bot to keep the arm raised after they let the button go? they are using easyc to program. I don't know enough about this to help them...

  • #2
    I don't know EasyC unfortunately but I know both Modkit and ROBOTC have this function so I am sure it is in EasyC too.

    Comment


    • #3
      what is the function in robotc? perhaps I can figure it out from there.

      Comment


      • #4
        MoveMotor will o the job. You have to specify how much and the power level

        Comment


        • #5
          In ROBOTC you have to set the motor mode using:

          setMotorBrake(motorName, motorHold);

          for each motor that you want in brake mode.

          Then use one of the movement commands to move the motor (setMotor, setMotorTarget etc.)
          The internal PID of the motor will hold it in the last place it ended up unless you tell it to move.

          Comment


          • #6
            How do you do it in mod kit? We have the motor set as not with one button up and one down, so when it goes up the weight brings it back down

            Comment


            • #7
              In Modkit there is a block called Holding or similar. Set it to on in your program.

              Comment


              • #8
                in easyc we have set motor degrees and set motor rotations. will either of those work? does anybody else using easyc know?

                Comment


                • #9
                  Ok. we tried to use the set motor degrees button inside an if then loop. The arm will raise up now and stay but we can't get it back down.Here is what we have so far. We have no idea what we are doing...
                  Click image for larger version

Name:	easyc file.JPG
Views:	1
Size:	47.4 KB
ID:	1657

                  Comment


                  • #10
                    Are you able to use one of the free languages (Modkit or ROBOTC) as most people (me included) can provide better help with these. Or are you comitted to EasyC?

                    I've had a quick look at some tutorial videos for EasyC V5 and I haven't seen a motor hold equivalent but ot must be there somewhere!

                    Comment


                    • #11
                      I think we are committed to easyc because I cannot install new software on our laptops here at school, only IT admin people can. I'm pretty sure easyc is the only software the county purchased.

                      Comment


                      • #12
                        My question is in mod kit, how do you program the flex robot arm? It is setup as a motor but when the arm goes up it just falls down. How do you get it to hold.

                        Comment


                        • #13
                          In the blocks part, under the motor in question put a When Start block and attach to that a Set Motor Holding to On block, thats it.

                          Comment

                          Working...
                          X