Whenever we are spinning our flywheel, once it hits max speed it just slows down. How do we make the flywheel stay at max speed?
To ensure consistent velocity, I would suggest specifying voltage instead of speed. Do note, temperature may also impact speed as the motors are designed with safeguards.
how do you ‘specify’ motor?
You can use this block of you’re in blocks
Or for text it would be
Motors unexpectedly slowing down is commonly due to them being worked hard and hence getting hot. The system slows them down to allow them to cool to avoid damage. Find out how hot the motor is getting by printing the temperature to the brain or controller screen. You’re dealing with the laws of physics. I would guess that you’ll need to reduce the acceleration of the motor. You could do this by setting the driving voltage to something less than the available maximum, or you could design the specific cadence of speeds in a loop. Imposing specific intermediate speeds, however smooth you might try to be, may incur additional energy use and therefore heat due to the cycle of overshoot and undershoot in the motor’s own PID control all the way. Acceleration per se will generate heat, but you can also cook things with friction. Escape friction with these: High Strength Shaft Ball Bearing (11-Pack) - VEX Robotics I haven’t had a chance to try this specific product yet, but the choice of bearing type looks sensible.