Go to Post "One man's trash is our robotics team's fundraiser" (We have an aluminum can drive to raise money) - bombadier337 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2008, 23:09
blaxbb blaxbb is offline
Ohio State Engineering Scholar
AKA: Brian Barrett
FRC #2331
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Vernon, New Jersey
Posts: 131
blaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really nice
Relays and IR Board

Quote:
Originally Posted by Spartan151 View Post
Okay. Once I get the basics done, I will need help programming the IR board functions, and programming the pneumatics for our claw to the arm joystick. I'll let you know when we get to that stage, but please, feel free to explain ahead of time. It'll help our team get a better understanding so there's no head-scratching later.
This is where the electronics and programming team/person has to work together.

The pneumatic cylinders are piped by solenoids (electronic valves,) which are controlled by a spike (relay.)

Relays don't use the analog 0-254 scale. They are essentially digital outputs that can be either forward, off, or reverse.

You map the relays the same way that you map speed controllers.

Code:
relay1_fwd = p1_sw_trig;
That would set relay1 to be forward every time your joystick 1 trigger is held.

IFI has a list of the joystick inputs here. pdf warning



As far as the IR, you need to read the digital input (1 or 0) and pass it through a conditional (if, else, switch) to execute a command.

Code:
if (rc_dig_in01 == 1) {
     pwm01 = pwm02 = 200;
     }
else {
     pwm01 = pwm02 = 127;
}
change rc_dig_in01 to match up with the digital input that was wired to your bot

the reference docs to wire and train the IR board are here. pdf warning
__________________
"Whether you think you can or think you can’t, you’re right." - Henry Ford
www.vthsrobotics.org
Closed Thread


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
NEW PROGRAMMER!!!!! NEED HELP!!!! delphi demon Programming 5 19-04-2007 13:22
pic: Team 1249's new programmer roborat Extra Discussion 4 23-06-2006 22:02
Senior Programmer: advice on training new recruits Jeff_Rice Programming 9 04-01-2005 16:59
Help for New Programmer Mike375 Programming 3 27-09-2001 09:04


All times are GMT -5. The time now is 09:08.

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