|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: PWM Speed
You would probably want to scale the precision of whatever control mechanism or joystick you are using to get the full scale of motion, so this should graph that to the new maximum:
Code:
long answer; //Must be long to hold precise values
if (p1_x > 127){ //Or whatever joystick
answer = p1_x * 200 / 255;
pwm02 = (unsigned char)answer; //Cast this to the proper type
} else {
pwm02 = p1_x;
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digital out signal speed on off, almost like PWM but at max 60Hz | Generalx5 | Electrical | 2 | 27-03-2007 12:26 |
| trouble with pwm speed controller | jakk | Control System | 4 | 10-01-2005 02:51 |
| trouble with pwm speed controller | jakk | Electrical | 4 | 10-01-2005 02:51 |
| Ugh...PWM pin vs. Speed Controller | archiver | 2001 | 1 | 24-06-2002 00:27 |
| Speed Controller/PWM problems.... | Clark Gilbert | Technical Discussion | 8 | 08-01-2002 00:14 |