View Single Post
  #1   Spotlight this post!  
Unread 31-08-2010, 22:23
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: How to work with pneumatics

Quote:
Originally Posted by Rangel(kf7fdb) View Post
Never mind, got the compressor to start but now we need to get the compressor to stop. How do you make it stop at 60 psi?
you have compressor.Start() in the OperatorControl loop. it should be in the initializer (where you have GetWatchdog().SetExpiiration(0.1), so your code becomes
Code:
	RobotDemo(void):
		myRobot(3, 4),	
		myRobot2(2, 1),
		myRobot3(5, 6),
		stick(1),
		stick2(2),
		stick3(3),
		compressor(1, 8)
		
	{
		compressor.Start();
		GetWatchdog().SetExpiration(0.1);
	}
Assuming you have a pressure switch hooked up to GPIO port 1 your compressor should stop at 120 psi

Also, why do you have 2 different robotDrives running with the same inputs? You can list 4 jaguars in the initializer of a single robotDrive and it will output to two motors per side.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote