Go to Post Some High School students understand safety and can follow complex instructions. - DonRotolo [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 07-02-2004, 23:47
Fen's Avatar
Fen Fen is offline
fensterMACher
AKA: Michael Fenster
#0374 (The IceBreakers)
Team Role: Coach
 
Join Date: Feb 2004
Location: Anchorage, Alaska
Posts: 2
Fen has a little shameless behaviour in the past
Question Beacon selector switch? How to find/make?

In working on the program to test the IR sensors, the code we get is, "This code assumes beacon type selector switch is on digital I/O 7." Other threads state that a switch must be installed to use this function in competition. What sort of switch do we need? Was it in the KOP? Do we buy it locally? What specs if so?
  #2   Spotlight this post!  
Unread 08-02-2004, 01:02
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Beacon selector switch? How to find/make?

Unpowered switches are pretty much the same all around - they simply connect the two ends of a circuit together, closing it. I don't believe switches are in the KOP, but they should be dirt cheap at your local store. Oh, and BTW, could you please not use light blue text on the grey background? Near impossible to read...
  #3   Spotlight this post!  
Unread 08-02-2004, 02:06
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Beacon selector switch? How to find/make?

Any toggle switch should work, but avoid rocker or momentary switches (pretty much any one that springs back to the a position after you push it). If you are ordering from a catlog like DigiKey you need a toogle switch with a Switch Function: SPST (Single Pull Single Throw) and Switch Circuit: On-Off or Off-On. Avoid any switch with the a Switch Circuit that says "Mom" (Momentary).
You could do as Steve said and make a simple closed circuit by cutting 3 pin cable (AKA PWM cable) and soldering the black wire to the white one. Just plug this cable into digital in 7 when you want to seek beacon type 0 (longer period) and unplug it when you want to seek beacon type 1 (shorter period). I am not sure which beacon FIRST will place on which side.
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
  #4   Spotlight this post!  
Unread 08-02-2004, 09:40
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: Beacon selector switch? How to find/make?

You could just put a jumper across the pins, no?
  #5   Spotlight this post!  
Unread 08-02-2004, 10:32
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by KevinB
You could just put a jumper across the pins, no?
As long as you avoid the +5v center pin.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 08-02-2004, 11:04
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by Mark McLeod
As long as you avoid the +5v center pin.
Good call. For some reason I was thinking that the +5v pin was to the outside.
  #7   Spotlight this post!  
Unread 09-02-2004, 19:48
Fen's Avatar
Fen Fen is offline
fensterMACher
AKA: Michael Fenster
#0374 (The IceBreakers)
Team Role: Coach
 
Join Date: Feb 2004
Location: Anchorage, Alaska
Posts: 2
Fen has a little shameless behaviour in the past
Re: Beacon selector switch? How to find/make?

Thanks so much for the info. FWIW, the light blue color is our team color; I'll not use it again. We were using the center pin, so that is our trouble. Off to the races!
  #8   Spotlight this post!  
Unread 11-02-2004, 16:19
shsdragon shsdragon is offline
Registered User
#1345
Team Role: Programmer
 
Join Date: Jan 2004
Location: Florida
Posts: 8
shsdragon is on a distinguished road
Send a message via AIM to shsdragon Send a message via Yahoo to shsdragon
Exclamation Re: Beacon selector switch? How to find/make?

i don;t thisswitch how does it rrecognize wut type beacon it is someone plz explain
  #9   Spotlight this post!  
Unread 11-02-2004, 16:34
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by shsdragon
i don;t thisswitch how does it rrecognize wut type beacon it is someone plz explain
The switch returns a value of 0(on) or 1(off)

In the tracker code this switch value is represented by rc_dig_in07

rc_dig_in07 is given another name (DESIRED_BEACON_TYPE) by tracker.h and that's what you'll see used in the tracker.c code.

The tracker code then checks rc_dig_in07 to see which of the two beacon types it is supposed to be looking for.

FIRST hasn't yet told us which sides of the field the two beacons are going to be on, but if you have your beacon switch you can just label them at the regional competition.
I like to think of the switch as red/blue alliance rather than beacon type-0/type-1.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-02-2004 at 09:44.
  #10   Spotlight this post!  
Unread 11-02-2004, 16:39
Matthew_H's Avatar
Matthew_H Matthew_H is offline
Ubergeek
#1028 (Ubergeeks)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2001
Location: Huntsville,AL
Posts: 105
Matthew_H will become famous soon enough
Send a message via AIM to Matthew_H Send a message via MSN to Matthew_H
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by Mark McLeod
The switch returns a value of 0(on) or 1(off)
In the tracker code this switch value is represented by rc_dig_in07

rc_dig_in07 is given another name (DESIRED_BEACON_TYPE) by tracker.h and that's what you'll see used in the tracker.c code.

The tracker code then checks rc_dig_in07 to see which of the two beacon types it is supposed to be looking for.

FIRST hasn't yet told us which sides of the field the two beacons are going to be on, but if you have your beacon switch you can just label them at the regional competition.
I like to think of the switch as red/blue alliance rather than beacon type-0/type-1.
I don't think they will be either red or blue alliance because there is a beacon on either side of the field. Which means one red alliance will go towards beacon 0 while the other red alliance will drive towards beacon 1. If I am wrong about this please let me know.

So for the switch we just need to jumper the first and third pins for beacon type 1 and leave them off for beacon type 0? I think we tried that and by default it was looking for beacon type 1 with no jumper. I had to hard code in beacon type 0 for it to look for that beacon.
__________________
Matthew

  #11   Spotlight this post!  
Unread 11-02-2004, 16:47
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by Matthew_H
I don't think they will be either red or blue alliance because there is a beacon on either side of the field. Which means one red alliance will go towards beacon 0 while the other red alliance will drive towards beacon 1. If I am wrong about this please let me know.

So for the switch we just need to jumper the first and third pins for beacon type 1 and leave them off for beacon type 0? I think we tried that and by default it was looking for beacon type 1 with no jumper. I had to hard code in beacon type 0 for it to look for that beacon.
Sorry, we are using a left/right switch as well as a red/blue alliance switch to simplify things for the drivers. That also tells us which direction to strike out at the 10 pt ball, as well as which beacon to home-in on.

[edit]
Quote:
Originally Posted by Matthew_H
So for the switch we just need to jumper the first and third pins for beacon type 1 and leave them off for beacon type 0? I think we tried that and by default it was looking for beacon type 1 with no jumper. I had to hard code in beacon type 0 for it to look for that beacon.
If the jumper is off the tracker will look for beacon type-1.
With the jumper on it will look for type-0
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-02-2004 at 09:47.
  #12   Spotlight this post!  
Unread 11-02-2004, 17:05
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by Matthew_H
I don't think they will be either red or blue alliance because there is a beacon on either side of the field. Which means one red alliance will go towards beacon 0 while the other red alliance will drive towards beacon 1. If I am wrong about this please let me know.

So for the switch we just need to jumper the first and third pins for beacon type 1 and leave them off for beacon type 0? I think we tried that and by default it was looking for beacon type 1 with no jumper. I had to hard code in beacon type 0 for it to look for that beacon.
yes, you'll need to modify the default beacon code to check rc_dig_in01 for which beacon type it should broadcast.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #13   Spotlight this post!  
Unread 12-02-2004, 15:39
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Beacon selector switch? How to find/make?

can you use the switches for other stuff? like if you want to change from IR autono to dead reck autono?, or if you have two dead reckonin codes, be able to switch it before the game?
If you can, can you tell me the variable asigned to the pins?
Thanks.
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
  #14   Spotlight this post!  
Unread 12-02-2004, 16:31
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Beacon selector switch? How to find/make?

Quote:
Originally Posted by Code\\monkey
can you use the switches for other stuff? like if you want to change from IR autono to dead reck autono?, or if you have two dead reckonin codes, be able to switch it before the game?
If you can, can you tell me the variable asigned to the pins?
Thanks.
Yes, that's one of the main uses of switches.

We have:
- Left/Right switch
- Red/Blue alliance (the combinaton of these two specify the beacon type and which side of the robot the 10 pt ball will be on.)
- a 16-position BCD switch for selecting autonomous modes. It also doubles as a diagnostics switch when in user mode, e.g., center servos.

You can use a multi-position rotary switch from your local Radio Shack by wiring each position to a different available digital input.
Then test it in your code like so:
Code:
if (!rc_dig_in01)
{
	IR_Tracking();
}
else if (!rc_dig_in02)
{
	Dead_Reckon();
}
else
	Dead_Reckon();  // Always finish with a default setting
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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
Official Beacon Tracking Code Posted Kevin Watson Programming 41 18-02-2004 21:04
IR Beacon/reciever not working... still... Ferazel2001 Programming 23 04-02-2004 23:30
ir beacon range doy Programming 10 29-01-2004 16:46
edu and ir beacon alan koch Robotics Education and Curriculum 4 26-01-2004 22:43
Making a beacon indicator LED burn its brightest without burning out DanL Electrical 7 26-01-2004 08:05


All times are GMT -5. The time now is 06:00.

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