View Single Post
  #2   Spotlight this post!  
Unread 18-02-2008, 09:37
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Please help with our IR code, we are so confused

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.

Last edited by gnormhurst : 18-02-2008 at 09:41.