Is there a way to program a motor that will run at different speeds based on its position in driver control? I want my ramp to slowly slow down as it goes up to stack. I would like to use PID (or I guess P) so that it’s a smooth transition rather than a bunch of “if” statements.
What you could do is implement slew rate so that the drive slowly accelerates
You could also go with an object-oriented approach. This thread -Very Simple Very Accurate Chassis Control Code Release - #10 by theol0403 - talks a lot about that specifically and is a more generic setup so that you can control just about anything with PID in different ways, including during the driver control period.
If you could figure out a way to include slew rate into this, that might be the best, albeit most difficult way to control a tray accurately.