Go to Post My team is graduating yet another class of great kids who will go into the world capable and focused. And after a decade and a half of FIRST robotics those memories are as treasured as any trophies. - Wayne C. [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 25-01-2014, 11:35
ShakespeareIJP ShakespeareIJP is offline
Registered User
AKA: Jack Hemphill
FRC #2234 (Karmic Boomerang)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Newtown Square
Posts: 1
ShakespeareIJP is an unknown quantity at this point
Help with programming Solenoids

I am terrible at programming anything pneumatic related, and solenoids are unfortunately no exception. Netbeans keeps getting an illegal start of expression.
Here is my code:


package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Solenoid;

public class Solenoids {


private Solenoid uno;
private Solenoid dos;

private boolean solenoidBoo = false;



public MySolenoid(1 , 2){
solenoidBoo = true;
uno = new Solenoid(8, 1);
dos = new Solenoid(8, 2);
System.out.println("We have liftoff" + 1 + " and " + 2);
}




public void extend() {
uno.set(true);

if(solenoidBoo) {
dos.set(false);
}
}


public void retract() {
uno.set(false);

if(solenoidBoo) {
dos.set(true);
}
}


public boolean get() {
return this.uno.get();
}

public boolean getDos() {
boolean otherBoo = dos.get();
return otherBoo;
}
}
Reply With Quote
 


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 09:31.

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