View unanswered posts | View active topics It is currently Fri Jul 01, 2016 2:32 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Motor Power Manipulation, too sensitive. Top hat procedure?
Author Message
Rookie

Joined: Wed Jan 21, 2009 4:51 pm
Posts: 2
Motor Power Manipulation, too sensitive. Top hat procedure?
Our team has the joystick controlling the motor, but as it is right now, it is too sensitive. The slightest touch of the joystick will turn the motor at too high of a power. it is worth noting that these motors are for an arm, not the drive train.

Also, prior to using the joystick, we wanted to use Tophat (the arrow buttons) but at every attempt we got an error, stating that it was not a procedure, Any help would be appreciated.

Wed Jan 21, 2009 5:02 pm
Rookie

Joined: Sun Nov 16, 2008 3:07 pm
Posts: 45
Re: Motor Power Manipulation, too sensitive. Top hat procedure?
We are using the top hat to tell the robot which direction to turn, like this:
else if(joystick.joy1_TopHat != -1)
{
// the top hat buttons say "turn to that compass point".
int desiRightWallHeading = joystick.joy1_TopHat * (360/8);
}

This exploits the fact that the tophat value will be a number between 0 and 7 (unless it isn't being pushed, in which case it is -1).

To attempt the other half of your question, you might want to make any joystick value near zero the same as being at zero by putting in a "deadband".

Our team (1001) did it like this:
{
motor[motorD] = joystick.joy1_y1;
}
else
{
motor[motorD] = 0;
}
{
motor[motorE] = joystick.joy1_y2;
}
else
{
motor[motorE] = 0;
}

and if you aren't having a zeroing problem, but rather a "too darn fast at any position" problem, then you can just divide the joystick value by some number before assigning it to a motor, like this:
motor[motorE] = joystick.joy1_y2 / 4;

That makes a joystick value, that will range from -128 to +127 or so map to motor commands from -30 to +30%.

If you are good with a joystick, but want fine slow speed control but not lose the max power options that the above system does, you can map them through an exponential system so the farther you push the joystick, the more effect (per degree of push) is has on the motor.

Wed Jan 21, 2009 10:33 pm
Rookie

Joined: Wed Jan 21, 2009 4:51 pm
Posts: 2
Re: Motor Power Manipulation, too sensitive. Top hat procedure?
incredible ideas. thank you so much. We will be trying it tomorrow.
Thanks again!

Wed Jan 21, 2009 11:43 pm
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

 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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning