Go to Post "You fogot the gears!!!!" - The_Gman [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 29-01-2013, 12:33
JCHS JCHS is offline
Registered User
FRC #3301
 
Join Date: Jan 2013
Location: Portland, IN
Posts: 9
JCHS is an unknown quantity at this point
Pneumatics Programming Help

Hi, I'm new to programming with Java. I'm using Netbeans command based robot. I currently have the drive and buttons working but I don't know how to do the pneumatics.

How do you program the compressor to start and stop on its own?

How do you tell the solenoids to fire?

I think I need a subsystem for pneumatics that controls all of this, and then specific commands to fire those solenoids. Any help would be much appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2013, 12:35
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Pneumatics Programming Help

Luckily you do not have to do anything for the compressor except create it and start it. We did this in RobotMap in the init() method.

To fire solenoids you do a set(true) and set(false) to then them on and off.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2013, 13:47
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: Pneumatics Programming Help

I was also new to java this year so I am glad to finally be on the opposite end of the question for once. All you need to do is put your compressor inside of whatever class you have extending iterative robot. Inside the robotInit method put in compressor.start(). Then leave the shutting off part to your pressure switch. Now make a subsystem for the piston you are using (for me I call ours ShootPiston). Inside the subsystem make two Solenoid objects (one for extend and one for retract). Make three methods (extend, retract, stop) and set the solenoid objects using their set method to true or false depending on what each one is doing. Then make commands to extend and retract and in there call each method respectively. If you need more help with this or if I wasn't clear let me know.
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2013, 15:34
JCHS JCHS is offline
Registered User
FRC #3301
 
Join Date: Jan 2013
Location: Portland, IN
Posts: 9
JCHS is an unknown quantity at this point
Re: Pneumatics Programming Help

Alright. I think I understand everything you are saying, but when I put compressor.start() in robotInit, it gave me an error like it can't find compressor. Why is this?

And I'm pretty sure I understand the solenoid part. Sounds simple enough. If you get bored, could you post me a link or a part of this code please just in case. Better safe than sorry.

Thanks again for your help.
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2013, 16:10
JCHS JCHS is offline
Registered User
FRC #3301
 
Join Date: Jan 2013
Location: Portland, IN
Posts: 9
JCHS is an unknown quantity at this point
Re: Pneumatics Programming Help

Never mind. I got it all figured out. Thanks again for your help. It really is pretty easy. I just didn't know where to put the compressor.
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 10:09.

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