Quote:
|
Originally Posted by stephenthe1
the encoder is working!!! thanks for the help in this thread. I'm still looking at our compressor, though it's not a pain to enable, just that they have it wired oddly. thanks again!
|
Congratulations! Does that mean the arm is working too?
Earlier, you said
Quote:
ok, our compressor is hooked up to digital 17. from last year's white sheet with the different wires labeled, it says that the sensor for the relay is hooked up to analog 1. I'm new to the compressor stuff. Is this all of what you need to write the code for it? It is hooked up to a spike. unless this is hard, could you show me the code for this, and tell me where to put it. That would allow me to learn from it as I get confused easily when I have to write things on my own without experience. as soon as you can is best, as I'm at a robotics meeting right now.
thank you for your help,
Stephen
|
Did you mean the compressor is on
relay 17? And did you really mean analog 1 for the pressure switch? If so, is it the pressure transducer (an analog pressure sensor) or the (digital) pressure switch?
The default code expects the compressor to be on relay 8, and the pressure switch on
digital 18. If you hook up your compressor and pressure switch this way, you're golden. These lines in Default_Routine() in user_routines.c will take care of the compressor:
Code:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
relay8_rev = 0;
If you really are using the pressure transducer, and you want to leave the compressor on PWM 17, you will need to add some code that I'm not prepared to help you with right now, since we haven't used any analog inputs on the robot since we have gotten the new controllers.
BTW, I think that last year, the ruling was made that even if you want to use the pressure transducer, you still have to have the digital pressure switch. If this is the case (and you still want to leave your compressor on relay 17), you will need to change the line in Default_Routine() to
Code:
relay17_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
relay8_rev = 0;
(Change rc_dig_in18, if necessary, to whatever digital input you connect your pressure switch to.)