|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
Re: Pneumatics Code
|
|
#4
|
|||
|
|||
|
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. Last edited by kennypu : 14-02-2010 at 22:16. |
|
#5
|
|||
|
|||
|
Re: Pneumatics Code
great thanks for the help guys
|
|
#6
|
||||
|
||||
|
Re: Pneumatics Code
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pneumatics Testing...with code or direct to power? | rsegrest | Pneumatics | 2 | 03-02-2010 16:40 |
| Pneumatics Code | nighterfighter | C/C++ | 16 | 12-10-2009 17:52 |
| problems using gyro/adc code with camera default code | tanstaafl | Programming | 7 | 22-01-2006 23:09 |
| Pneumatics-Code [and piston output length] | reilly | Programming | 5 | 13-02-2005 11:42 |
| Pneumatics-Code [and piston output length] | reilly | Technical Discussion | 0 | 10-02-2005 12:21 |