View Single Post
  #5   Spotlight this post!  
Unread 15-01-2008, 22:58
divergentdave divergentdave is offline
Registered User
FRC #1816 (Green Machine)
 
Join Date: Jun 2006
Rookie Year: 2007
Location: MN
Posts: 35
divergentdave is a jewel in the roughdivergentdave is a jewel in the roughdivergentdave is a jewel in the rough
Send a message via AIM to divergentdave
Re: Autonomous mode does not work

Quote:
Originally Posted by kaszeta View Post
My guess is that you're trying to read digital_io_xx variables, which aren't the inputs.

These should be rc_dig_in_xx variables instead.
Yes, this is correct. The digital_io_## variables just control whether a given port is to be used as an input or as an output. So, in your initialization, you'll want to set
Code:
digital_io_1 = digital_io_2 = digital_io_3 = digital_io_4 = INPUT;
Then, later, your if statements should read
Code:
if (rc_dig_in01)
__________________
Team 1816 - The Green Machine