![]() |
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. |
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 |
Re: Pneumatics Code
|
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. |
Re: Pneumatics Code
great thanks for the help guys
|
Re: Pneumatics Code
Quote:
|
| 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