I need to convert a double to an integer. I have some some information on-line about how to do this, but nothing that is step-by-step enough to figure it out.
I am working on PID control for a line follower bot.
I have calculated my motor power control value as a double.
Now I need to convert it to an integer for use in: MotorA.setPower(PowerA);
Any help would be greatly appreciated.