View Single Post
  #5   Spotlight this post!  
Unread 09-01-2004, 16:59
squide's Avatar
squide squide is offline
Architeuthis Clarkei
#1056 (Kekoa O Ha'aheo)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Hilo, Hawaii
Posts: 44
squide is on a distinguished road
Re: Some EDURobotics Problems

Quote:
Originally Posted by Mark McLeod
unsigned char digitalvalue;
unsigned int analogvalue;

digitalvalue = (unsigned char) rc_dig_in06;
analogvalue = (unsigned int) Get_Analog_Value(rc_ana_in01);

printf("My digital value %d, My analog value %d", (int) digitalvalue, (int)analogvalue);
Thanks, that did the trick. I'll remember to do something like that for printf's. Here were my statements before:

printf("Analog 1 = %d\n", Get_Analog_Value(rc_ana_in01));
printf("Digital 6 = %d\n", rc_dig_in06);

So now I can see why it didn't work!