Digital Inputs Driver Station

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

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 :slight_smile: