Log in

View Full Version : Digital Inputs Driver Station


dboisvert
24-02-2009, 19:11
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
24-02-2009, 20:20
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
25-02-2009, 20:09
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 :-)