Ok, i'm trying to program my controller to an tetrix arm, which is powered by a motor. But the motor is too powerful, so I tried to change the programming, but it turned out all weird. when I make a the motor turn one way, it keeps on turning in the same direction, and even when i tried to put in something to stop it, it still goes one way. Can anyone tell me what i'm doing wrong so I can correct it? Thanks!-Lincoln

One of the main problems you might be having is that joysticks don't always settle back to (0, 0) when they're released. Every controller is slightly different, the springs are slightly more worn in some places than others. You usually can't count on joystick values under 10 being very reliable (unless you're holding the stick yourself). Also, your code uses while loops, which I'm pretty sure are not what you want.

You said the motor was "too powerful." I assume it was moving too quickly. Be mindful that reducing the number you send to a motor reduces both its speed and its power. I'd suggest using gear ratios to increase the torque and decrease the speed at which the arm rotates.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum