Quote:
Originally Posted by programmr
still nothing someone please help
|
First a clarification question - do you have the compressor hooked up through a spike to relay 7?
Next, check a few things:
- does your compressor run if you hook it up straight to the 12V battery?
- Can you get the compressor to run through the system (ignoring the pressure switch for right now)? Just set relay7_fwd = 1; and see if it turns it on (make sure the hoses are disconnected so you don't blow something up)
- Can you get a reading from the pressure switch? throw in a printf("pressure switch = %d\r\n", rc_dig_in02); somewhere, hook up the hoses, and manually control the compressor to see it run through the full range 0-120psi and back down. Watch the input from the pressure switch on the terminal window, and see how it changes as the pressure changes.
Assuming all of that works out, you should be able to see pretty clearly how to wire in the pressure switch to turn on/off the compressor.