Shooting ball With RPM

I am currently trying to make my robot know if the ball that it used the conveyer belt to shoot into the flywheel was shot by the flywheel or not. After it goes through the flywheel i want to stop the conveyor belt to keep another ball from going through and set the RPM back to 0 for it to get back up to (top RPM ) again and once that has happened move the ball into the flywheel with the conveyor belt.I also have a light sensor on the robot in order to tell if there is a ball on the robot near the flywheel. The code I currently have for RPM looks like this.

	
                int startCount= abs(SensorValue[I2C_6]); 
		wait1Msec(50);														
		int endCount = abs (SensorValue[I2C_6]);  
		int speedRpm = abs(endCount-startCount)/50; 
		writeDebugStreamLine("RPM: %d", speedRpm);   

the rest I don’t feel comfortable releasing at this time. But with that ^ code the robot wouldn’t be able to tell if the ball has entered and left the flywheel or not. How would I accomplish this. I would be willing to use sensors if needed but I really need to figure out how to do this

This post was answered by the community here.