|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||||
|
|||||
|
Re: Limiting acceleration in easyC
How?
Create 2 variables, "Out" and "Old_Out", default them to 127. Store the real final PWM output to Out, and subtract Old_Out, and if the difference is greater than some rate of change (say 50), reset the value to the rate of change (Out - 50). Then set Old_Out == Out, and repeat each loop. You'll have to manage the math a little bit, to prevent exceeding 255 or zero, and maybe elsewhere, but that basic idea is a simple PID loop with only D being used. Good idea? Maybe not. Driver training is probably a better approach. Don |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Moderating Acceleration / Deceleration | Tom Line | Programming | 7 | 15-02-2007 13:39 |
| Acceleration Curve | EricWilliams | Programming | 5 | 01-02-2006 16:27 |
| Kickoff easyC workshop integrated into EasyC help file | Dan Larochelle | Programming | 0 | 11-01-2006 06:12 |
| Acceleration Sensor Connected, but values are odd.... | Leav | Electrical | 7 | 04-02-2005 15:28 |