What does the printf tell you? I only see one suspicious thing. In your printf you should probably cast the values to int:
Code:
printf("Move: %d In01: %d, In02: %d, In03: %d, In04: %d \r \n", move, (int)rc_dig_in01, (int)rc_dig_in02, (int)rc_dig_in03, (int)rc_dig_in04);
Printf's '%d' directive tells printf to look for an int, and although I didn't check, I suspect the dig_in values are not ints.
What are the values of the pwm's at the end of the function?
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the
USPTO.
My favorite error message from gcc:
main is usually a function
My favorite error message from Windows:
There is not enough disk space available to delete this file.