Go to Post Congratulations! You have been successful! You got what you wished for! Now get to work. - gblake [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 15-02-2011, 16:01
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Compressor programming

I'm trying to program our team's compressor. It's hooked up to channel 7 on the IO. I'm doing the bare minimum code of

Code:
Compressor compressor = new Compressor(7,1);
compressor.start();
But that doesn't seem to be working. Any tips?
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2011, 21:34
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: Compressor programming

Does any of the code work, or does the robot die on starting? If it dies, it is probably an indication that the channels you've listed are incorrect somehow - perhaps not wired right?
Where does this code run - in the initialization method?
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2011, 21:55
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: Compressor programming

Quote:
Originally Posted by Patrickwhite View Post
Does any of the code work, or does the robot die on starting? If it dies, it is probably an indication that the channels you've listed are incorrect somehow - perhaps not wired right?
Where does this code run - in the initialization method?
All of it is done in robotInit and the robot loads up just fine, no errors.

- edit -
actually, our compressor is wired in to PWM 4. Just to clarify, that would be (4,4); correct?
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2011, 22:01
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: Compressor programming

Actually, the compressor has two distinct parts to it: the pressure switch (reads the pressure gauge) and the relay (turns the compressor on or off). The constructor for Compressor expects the location of the pressure switch first, and the relay second. Are you sure you're getting both of them in the right place?
Quote:
Originally Posted by javadoc
Compressor(int pressureSwitchChannel, int compressorRelayChannel)
Compressor constructor.
Compressor(int pressureSwitchSlot, int pressureSwitchChannel, int compresssorRelaySlot, int compressorRelayChannel)
Compressor constructor.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2011, 23:36
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Compressor programming

Are you sure you don't have a relay in between the compressor and the dsc and pd board?
Because then you'd need this
Code:
Relay relay = new Relay(1);
relay.setDirection(Forward);
relay.set(true);
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2011, 15:58
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: Compressor programming

Our spike relay is plugged in to channel 1 on our sidecar on the 'relay' side. In the code I have our compressor programmed like so:

Code:
Compressor compressor = new Compressor(4,1);
// as in pressure switch on channel 4, spike relay on relay-1?
I've tried the above relay code- with no luck. Anyone else have any clue what could be wrong?

- EDIT -
False alarm, we moved our relay to PWM 5, and moved some wires. Compressor works beautifully. Thanks everyone.
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye

Last edited by Robby Unruh : 20-02-2011 at 16:06.
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 12:40.

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