Modkit lifting an arm with two motors code

Hi,so we are trying to use teleop to raise an arm with two motors similar to the claw bot default code. Does anyone have some code they can share? We have the arm motors lifting, and staying, but then they do not want to come back down.

I’ll upload screen shots later.

This code lifts the arm and holds, but doesn’t allow us to put the arm down.

c2081475a519f7de7ed1e07340df7aa5.png

Can’t you just assign both motors to the same button press in the main screen of Modkit where you set up driver control? That’s how my team did it when we added a second motor to the clawbot design.

Add a block to turn holding off in between the when block and set power like this. In my test it worked like a charm.

Reply: He (or she) wanted it to have the hold function (which is pretty awesome if I do say so myself) so they went along this route to code it. It also provides a slower down movement so that it will not slam into the ground or cause unnecessary jerking to occur.

412efd84ea63dd4f7f563323b709ef50.png