View Single Post
  #11   Spotlight this post!  
Unread 21-03-2008, 20:34
popnbrown's Avatar
popnbrown popnbrown is offline
FIRST 5125 HOTH Lead Mentor
AKA: Sravan S
FRC #5125 (Hawks on the Horizon)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Illinois
Posts: 367
popnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond repute
Re: my first time programming

Second Jacob's idea, try using EasyC.

Other than that what are you using right now to program the robot?

I'm using Kevin Watson's code.

Thing about the Pressure Switch, is that whenever the Pressure gets ablve a certain point it sends a signal out to the RC (there should be a connection between the Pressure Switch and the RC). What you do is you check and see if this signal is on (usually a 1) or off (a 0). When its on you will want to turn off the compressor.

The pressure switch is a digital input and the compressor is a relay output.

Figure out which port number for your compressor and pressure switch.
Then using Kevin Watson's code, where XX stands for your port number

relayXX_fwd = !rc_dig_inXX;
relayXX_rev = 0;

Hope that helps!
Sravan
__________________
I am an employee of FIRST. However, the postings on this site are of my own perspective as a FIRST mentor and volunteer and do not necessarily reflect the views of FIRST.

FIRST Team 5125 Hawks on the Horizon Lead Mentor
FRC Team 4096 Ctrl-Z Former Mentor
FTC Team 5203 #19@! Former Mentor
FRC Team 1403 Cougar Robotics Alumni