View Single Post
  #6   Spotlight this post!  
Unread 11-02-2005, 16:24
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: Coding Problems?

Quote:
Originally Posted by lasoaaro
if... yesh, that's what it is, lol... ok so..uhm, tell me if this is right?
if digital_io_out18 = 115;
then..uhm...? lol sorry i'm not THE greatest with C...
hmm..see i was looking through trying to find a list of acceptable codes in C for robotics but i coudn't seem to find a list so I'm tryin' to figure it out...but you can use then statements..correct..?

Thanks
The pressure switch is connected to a digital input/output. So it can not have a value of 115, or even 30. It can only have a value of 1 or 0. So when the pressure reaches 115 psi is sends a signal (either 1 or 0, i don't know) and when it drops down to 95 psi it sends the opposite signal. The only way for you to read the exact pressure value is to add an additional analog sensor to measure the pressure. But why would you want to turn the compressor on at only 30 psi? That's the minimum pressure needed to run a solenoid! Wouldn't you want to keep your pressure at least half the maximum allowed value?