lasoaaro,
There are a few quick things you need to be aware of:
Your compressor should be hooked up to a "Relay" output, not a digital output. On your robot controller, you will see plugs labelled "Relay Outputs." These should be wired to a SPIKE Relay module, which in turn should be wired to your compressor.
The SPIKE driving the compressor should NOT be wiring to a Digital Output as you have mentioned.
Additionally, the Nason Pressure Switch should be wired directly to a Digital Input (not output as you stated - they are the same plugs, but you can configure them to be inputs OR outputs in software). Again you will see plugs marked "Digital In/Out" on the robot controller. Once everything is wired correctly, the correct code to use should be:
Code:
relayX_fwd = rc_dig_inYY;
Where X is the Relay Output for the compressor, and Y is the Digital Input for the Nason Pressure Gauge.
I noticed you are located in Peterborough. I don't know if it's feasible to visit Toronto, however if you are having programming difficulties, contact the director for the Regional(s) that you are attending, and they will be able to hook you up with a veteran programmer to assist you, or to arrange a time to visit a nearby team for help.
-SlimBoJones...
Quote:
|
Originally Posted by lasoaaro
Hello All FIRST Teams who read this.
My question goes out to the programmers. I was wondering if anyone knew a line of code that we could use to shut our compressor off once the pressure on the pressure guage reached 115psi and turned it back on if it dropped to around 30psi. our mapping is as follows:
digital_io_out17 /Compressor/
digital_io_out18 /Pressure Guage/
If someoue could help us that would be great!
Thanks alot guys
//~!AaRoN!~
|