Go to Post Real world learning: teamwork, design, building, and testing. - Rob2713g [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2010, 20:26
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2010, 20:33
keehun's Avatar
keehun keehun is offline
Team Captain
AKA: Keehun Nam
FRC #2502 (EP Robotics)
Team Role: Leadership
 
Join Date: May 2008
Rookie Year: 2008
Location: Eden Priaire
Posts: 474
keehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond repute
Send a message via AIM to keehun
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
__________________
For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast. -- Ephesians 2:8-9
2010: Quarter Finalist (MN 10,000 Lakes)
2010: Website Award (MN 10,000 Lakes)
2009: Quarter Finalist (MN 10,000 Lakes)
2009: GM Industrial Award (MN 10,000 Lakes)
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2010, 20:58
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Pneumatics Code

read http://first.wpi.edu/Images/CMS/Firs...sers_Guide.pdf
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2010, 21:36
kennypu kennypu is offline
Registered User
FRC #2467
 
Join Date: Jan 2010
Location: Hawaii
Posts: 40
kennypu is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2010, 12:17
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Pneumatics Code

great thanks for the help guys
Reply With Quote
  #6   Spotlight this post!  
Unread 15-02-2010, 19:29
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Pneumatics Code

Quote:
Originally Posted by keehun View Post
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.
Reply With Quote
Reply


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
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


All times are GMT -5. The time now is 15:17.

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