Go to Post remember kids, never listen to Big Mike.... - Mike Schroeder [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-24-2009, 07:11 PM
dboisvert dboisvert is offline
Registered User
AKA: Dan Boisvert
FRC #2405 (Divided by Zero)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Michigan
Posts: 57
dboisvert is an unknown quantity at this point
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.

Code:
DigitalInput *Switch1
DigitalInput *Switch2
Switch1 = new ?
Switch2 = new ?

Any help would be appreciated
Reply With Quote
  #2   Spotlight this post!  
Unread 02-24-2009, 08:20 PM
Kristian Calhoun's Avatar
Kristian Calhoun Kristian Calhoun is offline
Celebrating 20 years of 25
FRC #0025 (Raider Robotix)
Team Role: Mentor
 
Join Date: Oct 2005
Rookie Year: 2006
Location: No. Brunswick, NJ
Posts: 1,077
Kristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond reputeKristian Calhoun has a reputation beyond repute
Send a message via AIM to Kristian Calhoun
Re: Digital Inputs Driver Station

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);
__________________
Raider Robotix: Home | Twitter | Facebook | Instagram
Brunswick Eruption: Home | Twitter | Facebook

Last edited by Kristian Calhoun : 02-24-2009 at 08:22 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-25-2009, 08:09 PM
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Digital Inputs Driver Station

Quote:
Originally Posted by Kristian Calhoun View Post
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 :-)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How sensitive are the driver station digital inputs? FRC4ME FRC Control System 4 02-17-2009 08:26 PM
Inputs on Driver Station z2daj C/C++ 8 02-16-2009 04:12 AM
using digital inputs from the driver station SL8 NI LabVIEW 2 02-04-2009 03:53 PM
Programming Digital Inputs from Driver Station spooncwru Programming 8 02-01-2009 01:14 PM
Using driver station digital inputs Japper FRC Control System 6 01-19-2009 08:01 PM


All times are GMT -5. The time now is 10:07 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi