|
Re: Robot Drifting
You Constant (#define) can be a floating point value.
but....
when you apply it in your program the result will be an int.
ie.
#define CONSTANT 1.5
int adjust_speed(int speed_in)
(
int speed_out;
speed_out = (speed_in/CONSTANT);
return speed_out; //sends back an int
)
|