Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Pneumatics Code (http://www.chiefdelphi.com/forums/showthread.php?t=82686)

dnrobotics11 14-02-2010 20:26

Pneumatics Code
 
Hi everyone,

Last year our team didn't use any pneumatics on our robot so I never learned the code used in Wind River for to activate the compressor, regulators, etc. Could anyone provide me with a quick synopsis about how to program these features in C++ or just show me some source code for pneumatics that you have used? Thanks so much for the help.

keehun 14-02-2010 20:33

Re: Pneumatics Code
 
This is Team 2502's Pneumatics code.

http://github.com/keehun/TeamRobotCo...Pneumatics.cpp

It's somewhat complicated but that's because we have it multithreaded and the kicker is programmed to automatically retract after half a second.

Otherwise, the constructor section is probably the most important. If you want a clear cut simple example, let me know!

Thanks,
Keehun

byteit101 14-02-2010 20:58

Re: Pneumatics Code
 
read http://first.wpi.edu/Images/CMS/Firs...sers_Guide.pdf

kennypu 14-02-2010 21:36

Re: Pneumatics Code
 
I'm having problems with the compressor as well. I have the coding down, however I am not sure if the pwms are connected in the right direction. Is the ground (the black cable, for a regular white,red,black pwm) suppose to face in towards the sidecar or outtowards the edges? Also, I could not find the pin specs for the relay either, which pin is ground, +12, etc.?

EDIT:
okay I'm not sure whats wrong with ours. The compressor is functional, we have tested it with the battery. The relay is plugged into the relay port 1, and the pressure switch is on digital IO 1, both of the ground pins are facing out.
For the code,
I initialize the compressor using Compressor *m_com; at the beginning of the class, and declare it in the constructor: m_com = new Compressor(1,1); I do m_com->Start(); on the next line. This should start the compressor correct? It shows no activity for some reason.

dnrobotics11 15-02-2010 12:17

Re: Pneumatics Code
 
great thanks for the help guys

DjMaddius 15-02-2010 19:29

Re: Pneumatics Code
 
Quote:

Originally Posted by keehun (Post 920137)
This is Team 2502's Pneumatics code.

http://github.com/keehun/TeamRobotCo...Pneumatics.cpp

It's somewhat complicated but that's because we have it multithreaded and the kicker is programmed to automatically retract after half a second.

Otherwise, the constructor section is probably the most important. If you want a clear cut simple example, let me know!

Thanks,
Keehun

Dude, omg. Thanks so much. Saved us a ton of time and problems.


All times are GMT -5. The time now is 13:48.

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