Go to Post Competing at multiple regionals or Championship events has no bearing on the life lessons you will learn or the unbelievable memories you will have--for that is what FIRST is truly all about. - Alivia [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-02-2011, 16:04
Tds123's Avatar
Tds123 Tds123 is offline
There is no I in team =]
AKA: Timothy Shub
FRC #1396 (Pyrobots)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Tottenville High School
Posts: 27
Tds123 is an unknown quantity at this point
Send a message via AIM to Tds123
Compressor programming please help

Ok so i was reading the rule book and the pressure switch is supposed to start working at 115 PSI and turn back on at 95. The rule books says the cRIO must be programmed to react to the GPIO port that is connected to the pressure switch... The question is... what is a GPIO port?????

This is also my program for the compressor please tell me why this dosnt work please! i have no clue why.

#include "Compressor.h"

Relay compressor;
DigitalInput compressor_switch;

compressor(5),
compressor_switch(1),

if(compressor_switch.Get() == 1) {
compressor.Set(Relay::kOn);
sprintf(m_compressor, "Comressors is Off;");
lcd->Printf(DriverStationLCD::kUser_Line2, 1, m_compressor);
lcd->UpdateLCD();
} else {
compressor.Set(Relay::kOff);
sprintf(m_compressor, "Comressors is On.");
lcd->Printf(DriverStationLCD::kUser_Line2, 1, m_compressor);
lcd->UpdateLCD();
}
__________________
ThE sCaLeS oF bAlAnCe (Team 1396)
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi