View Single Post
  #8   Spotlight this post!  
Unread 15-02-2010, 00:35
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: Limit Switch Draws Tears

In your constructor, I see this line that stands out:

Code:
Dig1 = new DigitalInput(1, 1);
The DigitalInput constructor you're using looks like this:

Code:
DigitalInput::DigitalInput(UINT32 slot, UINT32 channel)
By constructing with DigitalInput(1, 1), it will try to look for a digital input on module 1. This won't work, since that's the analog module.

If you change it to look like this it should read Digital Input #1 from the default digital module (module #4).
Code:
Dig1 = new DigitalInput(1);
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award