Go to Post There's 2 things that are really hard in CS - naming things, cache invalidation, and off by one errors. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 08-02-2015, 08:33
ShaneWong ShaneWong is offline
Registered User
no team
 
Join Date: Aug 2014
Location: Thunder Bay
Posts: 12
ShaneWong is an unknown quantity at this point
How to attach and code fsp 8268909?

Hi I'm from team 4732, I've been having trouble figuring out how to attach/program this button (http://www.repairclinic.com/PartDeta...8268909/830916). Any help you could offer would be greatly appreciated.

Last edited by ShaneWong : 08-02-2015 at 09:44.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2015, 09:58
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: How to attach and code fsp 8268909?

Wire one side of the switch to ground and the other to a digital input channel.

On the programming side, look at the DigitalInput class:
http://team2168.org/javadoc/edu/wpi/...italInput.html
__________________
http://team2168.org
Reply With Quote
  #3   Spotlight this post!  
Unread 10-02-2015, 06:41
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: How to attach and code fsp 8268909?

I was struggling for a long time trying to figure out how to program these to stop motors when pressed and if that's your plan check out this thread: http://www.chiefdelphi.com/forums/sh...=133983&page=4
Reply With Quote
  #4   Spotlight this post!  
Unread 10-02-2015, 11:13
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: How to attach and code fsp 8268909?

It is hooked up to a PWM cable. You only need to wire the ground and signal (black and white, respectively) as the positive (red) wire has no use in a switch. Instead of plugging it into the PWM section of your RoboRIO, plug it into the section designated for digital inputs.

Programming side:

Code:
DigitalInput _switch1 = new DigitalInput(0);
if(_switch1.get) {
    System.out.println("Switch 1 is pressed!");
}
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


All times are GMT -5. The time now is 08:37.

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