|
Re: Robot not doing what we need it to, and printfs aren't working
Your print statements have mixed types where you attempt to print unsigned char (e.g., pwm01) and double (wFL) types as ints (%d). Typecast the arguments (int).
Statements such as:
pwm01 = (int)wFL + 127;
start with a double, typecast it to int, then assign it to unsigned char
as opposed to keeping your calculation as double then typecasting the result to unsigned char.
Are you doing that to speed things up? Just curious, not a problem.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 18-09-2008 at 08:37.
|