Go to Post Pretty robots, who cares? Quality robots are another matter. - Steve W [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 05-02-2003, 13:53
Mr. Ivey's Avatar
Mr. Ivey Mr. Ivey is offline
Mark Ivey
AKA: Mark
no team
 
Join Date: Sep 2002
Rookie Year: 2000
Location: Raleigh, NC
Posts: 171
Mr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of light
Send a message via AIM to Mr. Ivey
Select Memory

I know on the stamp chip there are multiple segments where code can be stored, and that specific segments can be selected. But my team wants specific forms of autonomous code in a specific segment, and have the ability to flip a switch and then preform a specific atounomous program. I have no clue if this is possible, could someone tell me if the ability to do this exists, and if so how do you do this. Thanks
~Mr. Ivey
__________________
When you tell a student not to do it, you shouldn't do it. Or else you will wind up with a 3/8" drill bit in your finger... Like I did...
  #2   Spotlight this post!  
Unread 05-02-2003, 15:23
Skabana159's Avatar
Skabana159 Skabana159 is offline
Robotics and Field Hockey
AKA: Jesse C. Owens
#0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2000
Location: Ft. Collins, CO
Posts: 92
Skabana159 is on a distinguished road
Send a message via AIM to Skabana159
Well, in autonomous mode, be aware that the switches must be attached to the RC, not the OI.
But yes, you can have up to 8 different programs on the stamp (0-7). Slot 0 is always run by default first, so you will need to serin your switches, and depending on input, you can run any of the slots. You run a program in a different slot with the command "run." You set different files into your slots by having them all open in the editor, and making your directive comment look like this:

'{Stamp BS2SX, slot1filename.bsx, slot2filename.bsx ...}
This will go in your program for slot 0, and all the ones in the list will fill up 1-7.

Let's say that you have your slot 0, with all the fancy initialization code, and you have two different autonomous programs, in slots 1 and 2. Then, you have your driver-control program in slot 3.

if auto_mode = 0 then run 3
if rc_sw1 = 1 then run 1
if rc_sw2 = 1 then run 2

In all of your slots, you should always check for auto_mode, because you want driver control to return as soon as possible. This should always be your first thought in all your programs.

Also remember that your 26 bytes of variable memory are shared between all of your slots. If you declare all of them in the same order, their values will be preserved. Otherwise, you must assume that they are chaos at the begining of each slot. I recommend that you find out which variables must be in all slots, and declare them all at the beginning of each slot. Then you can declare independent variables after those.
__________________
"What most people do not understand is that the Buddha, the Godhead, resides just as comfortably in gears and circuits as in hills and trees. To believe otherwise is to dilute the Godhead."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance

Last edited by Skabana159 : 05-02-2003 at 15:25.
  #3   Spotlight this post!  
Unread 05-02-2003, 19:12
Andrew Rudolph's Avatar
Andrew Rudolph Andrew Rudolph is offline
Git 'em!
no team (Robot in 3 Days)
Team Role: Mentor
 
Join Date: May 2001
Rookie Year: 2000
Location: Orlando, FL
Posts: 921
Andrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond reputeAndrew Rudolph has a reputation beyond repute
Send a message via AIM to Andrew Rudolph
Also look at innovation firsts website at firstrobotics.com in the white papers, there you will see a presentation on what you are asking

http://www.innovationfirst.com/first..._Bank_Code.zip
__________________
iR3 Creative Engineering
Robot in 3 Days

FTC 6323 The Pink TeamMentor
FTC 8996 Pink Fluffy BunniesMentor
FRC 233 The Pink Team Mentor
FRC 1902 Exploding Bacon Mentor
  #4   Spotlight this post!  
Unread 05-02-2003, 19:55
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Remember to check auton_mode after EVERY serin, not just at the beginning of each file. Likewise, make sure each slot has a way of getting to the SERIN/SEROUTs. The easiest way to do this is to just copy and past them into each file. Ditto for the DO...LOOP that keeps everything running smoothly. There are many other ways you could do it and I'd be happy to answer any questions you may have regarding them via PM or email.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #5   Spotlight this post!  
Unread 06-02-2003, 14:35
Mr. Ivey's Avatar
Mr. Ivey Mr. Ivey is offline
Mark Ivey
AKA: Mark
no team
 
Join Date: Sep 2002
Rookie Year: 2000
Location: Raleigh, NC
Posts: 171
Mr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of lightMr. Ivey is a glorious beacon of light
Send a message via AIM to Mr. Ivey
Thanks, ya'll have been most helpful.
Mr. Ivey
__________________
When you tell a student not to do it, you shouldn't do it. Or else you will wind up with a 3/8" drill bit in your finger... Like I did...
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
What was your best memory from this year/ever? miketwalker General Forum 30 01-05-2003 13:24
PBasic Select Problem powercat Programming 4 31-01-2003 11:01
System Memory Yan Wang Computer Graphics 3 15-01-2003 15:29
Help!! Refresh my memory!! Mike Rush General Forum 1 14-01-2003 22:43
Uses for memory evulish Chit-Chat 21 24-10-2002 10:36


All times are GMT -5. The time now is 13: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