Go to Post Gotta love the blurred robots :cool: - Steven Donow [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
  #12   Spotlight this post!  
Unread 18-02-2010, 16:31
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: Compressor won't start

The compressor WILL NOT RUN without the pressure switch connected, this is because the switch is a normally closed contact, that goes open when its reached pressure.

The code you showed shows Digital In 4 as where its expecting the switch, and Relay 2 as where its outputting the signals. The LEDs on the sidecar near the relay ports will switch when its working.

Also, I highly recommend using pointers instead of directly instantiating your objects:

Code:
class myRobot : public SimpleRobot 
{
RobotDrive* driveBase;
Jaguar* someMotor;
Solenoid* someSolenoid;
Compressor* theCompressor;

myRobot(){
driveBase = new RobotDrive(1,2,3,4);
someMotor = new Jaguar(5);
someSolenoid = new Solenoid(1);
theCompressor = new Compressor(1,1);
theCompressor->Start();
}

void Teleop(){
someMotor->Set(1);
}

};
This way, you can pass them by reference, instead of by value, which breaks things. Its good practice.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressor won't start Alex_2487 C/C++ 6 12-02-2009 16:41
Wind River won't start radau C/C++ 6 19-01-2009 23:09
Won't Download! diaperrash89 Programming 4 25-10-2007 23:02
Running just the compressor (was: free compressor) sciguy125 Pneumatics 15 06-02-2006 18:23
Help! My 2003 Bot compressor won't shut off Jack21 Control System 10 11-02-2004 12:24


All times are GMT -5. The time now is 14:27.

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