how put a goal to the arduino to reach it

like if I want to enter a value and ask him to reach it?
for example i want it to get a speed of 3000RPM
The code is 60000000/3000=20000
and then he increment or decrement to do reach and when he reach it he stop!

thank you!

for example i want it to get a speed of 3000RPM

Normally I get into my car if I want to get near 3000 rpm ... I have no idea what your question is.

-Fletcher

Delta_G:

Goal goal;

Thingy thingy;
goal.setGoal(thingy, 60000000UL / 3000);
goal.goalReached(thingy.stop());

Javascript background??

goal.goalReached( thingy.stop );

Or

goal.goalReached( &thingy.stop );

what i sthe thingy
and how to increment

and how to increment

thingy++;
thingy = thingy + whatNot;
thingy += 9;
Take your choice.