Velocity graph

Anyone know how to use an online velocity graph to calculates a flyhweels RPM using a IME ?

I am not sure exactly what you mean by online velocity graph.

But for calculating rpm it is fairly simple
int lastTicks = nMotorEncoder[flywheel];
int speed = nMotorEncoder[flywheel] - lastTicks;

Then you just need to get into the right units which is pretty easy. There are a lot of other threads that go in depth on how to run this in its own task and implement PID for the flywheel’s speed but this is the basic concept that should get your started.