Go to Post Dean's said it before, and it's been repeated many times, but it clearly hasn't sunk in yet, so I'll say really loudly. FIRST is not a science fair! - Karthik [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 23-02-2004, 10:56
Shark[NH] Shark[NH] is offline
Registered User
#0404
 
Join Date: Feb 2004
Location: Hopewell/Petersburg, VA
Posts: 4
Shark[NH] is an unknown quantity at this point
Programming help

This is my first time programming the robot for our team. I was looking a tthe tracker code and cannot see how it works.

I can see that there are two sensors for each side. On the left side, you have a left and a right detector and on the right side, you have a left and a right detector. All I could find in the tracker code was one digital input defined. How do I connect up the 4 ir sensors and how do I code in the extra inputs to make this work?

I have been basing most everything off the default code... I still am not quite certain how to use the spike relays either...

Nick
  #2   Spotlight this post!  
Unread 23-02-2004, 11:45
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: Programming help

Quote:
Originally Posted by Shark[NH]
This is my first time programming the robot for our team. I was looking a tthe tracker code and cannot see how it works.

I can see that there are two sensors for each side. On the left side, you have a left and a right detector and on the right side, you have a left and a right detector. All I could find in the tracker code was one digital input defined. How do I connect up the 4 ir sensors and how do I code in the extra inputs to make this work?

I have been basing most everything off the default code... I still am not quite certain how to use the spike relays either...

Nick
The positions are stated in the comments. They arnt defined because they are interrupt driven. Look at the comments in tracker.c and recever.c, I cant remember the exact order but they are on digital inputs 3-6 (interupts 3-6 on your edubot). The PWMs are changeable and that is defined somwhere in there... its defaulted to pwm01 and pwm02, youl have to check the comments for that too. As for wiring... I think a schematic came with the kit... Or at least was in the manual. I cant remember exactly where I found it, but its essentualy the detector wired right to a sensor cable with a noise filter...

As for relays, thats very simple. Relays operate in 3 states. Forword, reverse, and neutral. Each relay relies on 2 binary varriables to deturmine its state. Lets use relay 1 for an example. If you wanted to set relay 1 forward you would do

relay1_fwd=1;
relay1_rev=0;

for reverse you would do

relay1_fwd=0;
relay1_rev=1;

For neutral they would both be zero. DONT set them both to one! Hope this helps
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #3   Spotlight this post!  
Unread 23-02-2004, 12:01
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
Re: Programming help

Looking at the default code
Navigate.h contains

Left Sensor servo in pwm01
Right Sensor servo in pwm02
Left Drive Motor in pwm03
Right Drive Motor in pwm04

The IR Sensors 1,2,3,4 are configured like this
1 - Left/Left (LL) - Left Sensor on Left Servo
2 - Left/Right (LR) - Right Sensor on Left Servo
3 - Right/Left (RL) -Left Sensor on Right Servo
4 - Right/Right (RR) - Right sensor on Right Servo

They get plugged into
LL - digital 3
LR - digital 4
RL - digital 5
RR - digital 6

The Digital input rc_dig_07 (digital 7) is the switch which states which beacon you are going to chase. Wire a toggle switch on you robot and plug it into Digital 7.
When you set up you robot on the field, you can flip this switch to have the code point to the beacon emmitting the "0" pulse or the beacon emitting the "1" pulse.

Hope this helps.

Phil
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
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
A few questions on programming the Control System Avarik Control System 21 08-02-2004 11:42
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46
pbasic programming punarhero Programming 4 21-01-2002 23:32


All times are GMT -5. The time now is 03:59.

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