currently we are using the camera to find the distance to the back boards and have been using encoders to find the RPMs needed at certain distances away.

Is there a way to mathematically and/or programmatically take a table with distances and RPMs to make the robot take any distance to the backboard and automatically give it that set RPM?

I would try just manual data logging (good ol pencil and paper) comparing distance value to RPM. Then put that into a spreadsheet or a math site like Geogebra and fit an equation. Then implement that equation into your program!

how would I go about doing that if I have a gap in the 2 RPMs

I have a top shooter wheel and a bottom

the top goes at 300 RPMs slower than the bottom

maybe 2 equations?

It sounds like you’re looking for the **Interpolate 1D** function. It’s in the Mathematics > Interpolation & Extrapolation palette. Give it a pair of arrays for the independent and dependent values, and it will find the appropriate output for a given input.