|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
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(); |
|
#2
|
||||
|
||||
|
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? |
|
#3
|
|||||
|
|||||
|
Re: Compressor programming
Quote:
- edit - actually, our compressor is wired in to PWM 4. Just to clarify, that would be (4,4); correct? |
|
#4
|
||||
|
||||
|
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:
|
|
#5
|
|||
|
|||
|
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); |
|
#6
|
|||||
|
|||||
|
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? - EDIT - False alarm, we moved our relay to PWM 5, and moved some wires. Compressor works beautifully. Thanks everyone. Last edited by Robby Unruh : 20-02-2011 at 16:06. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|