PDA

View Full Version : Digital Inputs Driver Station


dboisvert
02-24-2009, 06:11 PM
So what I have right now is 2 light switched connected to the driver station.

I am having a hard time declaring them. I am not sure on the proper syntax.

DigitalInput *Switch1
DigitalInput *Switch2

Switch1 = new ?
Switch2 = new ?

Any help would be appreciated

Kristian Calhoun
02-24-2009, 07:20 PM
You shouldn't have to declare new Digital Inputs. Use the existing methods in the Driver Station class:

DriverStation *ds;
ds = new DriverStation();

ds->GetDigitalIn(channel);

byteit101
02-25-2009, 07:09 PM
You shouldn't have to declare new Digital Inputs. Use the existing methods in the Driver Station class:

DriverStation *ds;
ds = new DriverStation();

ds->GetDigitalIn(channel);
DriverStation *ds;
ds = DriverStation::GetInstance();
We spent about an hour one meeting figuring this out :-)