![]() |
Slowing Down Drive Motors
This is team 1611 "rookies" having a little trouble with the single joystick method of control.When a direction is used the motors "jump" to an almost to fast speed but still allows for a top speed with gradual acceleration, the problem is trying to get rid of this "jump" through programming.Iv'e allready lowered the speed_setting to its lowest of 127 any suggestions?
|
Re: Slowing Down Drive Motors
Our programmers used something they referred to as a "drivemap" to scale the accelleration gradually. I have no idea how to do such a thing, but from my understanding it was some sort of table of values that they came up with
|
Re: Slowing Down Drive Motors
Quote:
|
Re: Slowing Down Drive Motors
Quote:
Although it could theoretically do it, the PIC in the RC isn’t exactly up for exponential equations. What we have done every year is a lookup table... it takes more effort then writing an equation; you need to come up with a chart with 127 (or 256, depending on how you write your code) like this made up example: Code:
int speed[] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,8,9,10,11,12,13,14,15,17,19,21,24....Code:
p1_y = speed[p1_y];this also gives you a chance to tweak your robots response time and "aggressiveness" best of luck -- jsd |
Re: Slowing Down Drive Motors
Instantiate two ints named temp15 and temp16. After the limit mixing functions have run, do this:
Code:
temp15=(int)pwm15-127; |
Re: Slowing Down Drive Motors
|
| All times are GMT -5. The time now is 13:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi