View Full Version : No!!!!!!!!!!
InnovationFIRST just posted the new RC default code and I'm not happy. First, it seems to use PBASIC 2.5, which doesn't exist according to google. Ditto on the use of the C-style (similar to switch) select commands.
Not only that, but it won't even tokenize correctly under the most recent STAMP software (1.33).
I'm hoping it's some kind of sick joke to make people like me hyperventilate, but it looks genuine. Depending on what happens in the next few days, this may mean I have to completely gut RoboEmu, not to mention un-teach all my mentees old PBASIC.
http://www.innovationfirst.com/FIRSTRobotics/documentation.htm
sanddrag
04-01-2003, 00:14
That is horrible. Perhaps the game can be easily won using the default code?
What does the Programming Reference Guide say?
And what about autonomous mode? Does the code indicate we will need to use it?
Sorry but I'm not a programmer but I'd like to know about these things nonetheless.
OK, between the periods of being passed out from the aforementioned hyperventilation (:D), I've done a little research. The programming guide says to refer to BASIC stamp manual 2.0c. I just looked through the entire 353 page thing and there's not a single occurance of the word else, or any reference to select...case constructs. The latter appears very similar to the QBASIC syntax, but that's another matter...
Also the $PBASIC directive doesn't seem to exist and the documentation completely ignores it, even though they do explain the $STAMP directive.
Given that the new RC code is dated 12-18-02, it seems really odd that they didn't post this earlier.
Anyway, as I said before, the default code doesn't even work anymore.
After reading the rest of the documentation, I'm a little calmer, as it says EduBot code and Full-size RC code are completely interchangeable, meaning RoboEmu should still work, at least with code written under the "old" style.
Finally, there references to autonomous mode appear to be copied-and-pasted straight fromt the EduCode, so it doesn't really give anything new away. It is definately there though.
Alphawolf829
04-01-2003, 00:38
im confused.... can we still use the old program style? or only that program and the edurobotic program?
Originally posted by Alphawolf829
im confused.... can we still use the old program style? or only that program and the edurobotic program?
The edurobotic program is the old style, so my guess would be yes. (rhyme unintentional. I swear.)
Alphawolf829
04-01-2003, 00:42
lol I guess the only way to be really sure is to test...
josh_johnson
04-01-2003, 00:44
I looked at the code and i think that this will be easier to program with than the previous version. It also suggests automation which will be fun as well.
But now I am going to have to print the new programming manual.
sanddrag
04-01-2003, 00:44
Originally posted by Alphawolf829
lol I guess the only way to be really sure is to test...
Or wait a few more hours.
Alphawolf829
04-01-2003, 00:53
actually just spoke to a friend says he straightened it out have to wait an see though...
Morgan Jones
04-01-2003, 17:00
I should hope the appropriate software comes in the KOP. This new syntax could be very useful if we are given something that will tokenize it...
How to Program the Robot Controllers (http://www.innovationfirst.com/FIRSTRobotics/pdfs/Programming_Reference_Guide.pdf)
The extra commands are the last 2 pages of the manual, although some more explanation would be nice...
Originally posted by Jnadke
How to Program the Robot Controllers (http://www.innovationfirst.com/FIRSTRobotics/pdfs/Programming_Reference_Guide.pdf)
The extra commands are the last 2 pages of the manual, although some more explanation would be nice...
Yes, they are there. I know that. The problem is that it says to refer to the BASIC Stamp manual for more information, but the manual doesn't have anyting on DO...LOOP,SELECT, etc. I even have the same version they are referencing (2.0c).
Unless there's something brand spanking new inside the KOP, I'm not sure how any of this is going to work.
Also, if you look at lines 468 - 479
if rc_sw5 = 1 then p3_y = p3_y MAX 127
if rc_sw6 = 1 then p3_y = p3_y MIN 127
if rc_sw7 = 1 then p4_y = p4_y MAX 127
if rc_sw8 = 1 then p4_y = p4_y MIN 127
if rc_sw9 = 1 then p1_wheel = p1_wheel MAX 127
if rc_sw10 = 1 then p1_wheel = p1_wheel MIN 127
if rc_sw11 = 1 then p2_wheel = p2_wheel MAX 127
if rc_sw12 = 1 then p2_wheel = p2_wheel MIN 127
if rc_sw13 = 1 then p3_wheel = p3_wheel MAX 127
if rc_sw14 = 1 then p3_wheel = p3_wheel MIN 127
if rc_sw15 = 1 then p4_wheel = p4_wheel MAX 127
if rc_sw16 = 1 then p4_wheel = p4_wheel MIN 127
According to my manual (version 2.0c) THis is also illegal. The only thing allowed after a then is an address that program control will be shifted to. Personally, I prefer this way, but last time I tried it she didn't work...
cybermind
04-01-2003, 20:10
:ahh: Ok, I am trying to calm down now that I realize that I am not the only one who is stunned by the default program!
The IF Statements are all wrong, the PBASIC 2.5 directive is not supported on the latest PBASIC Stamp Editor, Where in the manual is the SELECT command?, or the DO...LOOP. I am not going to argue that I rather program in this "new" language, it seems simpler, but umm... if it can't tokenize then isn't it kinda useless?
What do they expect the programmers to do? On top of autonomous mode are they going to have us make our own tokenizer too?
What is going on? I thought I would have this programming thing under control!
I just sent off an email straight to Parallax asking them if PBASIC 2.5 even exists. I'll let you guys know if they get back to me.
PyroPhin
04-01-2003, 20:23
the reason you cant find any data.. is that the version of Pbasic that the RC uses... is different than actual Pbasic for some reason. alot of the commands are slighty altered. expecially the Serin commands.. if you try to do that with the standard BS2.. it repots that the stamp isnt found.
the code is a little different.. but who cares? worry more that the new game is a Robot Tupperware party ^.^
~Pyro
Thanks for sending that email Rob. I sure hope this can be resolved soon. The CD in the KOP only contains pdf's of the FIRST manuals as far as I can tell.
Originally posted by PyroPhin
the reason you cant find any data.. is that the version of Pbasic that the RC uses... is different than actual Pbasic for some reason. alot of the commands are slighty altered. expecially the Serin commands.. if you try to do that with the standard BS2.. it repots that the stamp isnt found.
the code is a little different.. but who cares? worry more that the new game is a Robot Tupperware party ^.^
~Pyro
Umm... sorry, but that's just plain not true. The PBASIC that the RC uses is Parallax PBASIC. 100% pure, unmolested goodness. Yes, the method for getting data in and out of the program is not standard, but it still uses a standard command. Serin and Serout can be used on any of the Stamp 2SX's I/O pins, and InnovationFIRST just happens to have one of these connected to the input/output uP.
PyroPhin
04-01-2003, 23:05
the main difference i was referring to was the Serin/Serout stuffs.. but however, there are subtle differences in the coding.. not enough to notice.. but the stuff in the initiation routine is a little different.. I dont know if yhe casual programmer would pick up on it.. but when you dig deep.. there are teeny tiny things that will not run on a standard BS2.
Tootoloo
~Pyro
Alexander McGee
04-01-2003, 23:12
isnt there a way to reverse it? like, go backward? or, redo the basic code? or is that out of the question...?
Raven_Writer
04-01-2003, 23:24
This is not a good thing, but if you've done programming in any other languages like Visual Basic, C/++, or like someone earlier said QBASIC, then it isn't really difficult. And chances are they'll fix it up fast (hopefully anyways)
The code tokenizes fine for me (I'm using PBASIC 1.33 with the latest code downloaded)
Ryan Meador
05-01-2003, 00:42
I've just begun digging into this year's programming stuff, but one thing jumped out at me when I saw some of the posts in this thread (the more recent ones, in particular). I believe some of the subtle differences that were noted are the result of the BSIISX. I've had plenty of programs that wouldn't work on a standard BSII that do work on an SX, but I can't remember off the top of my head what the differences are.
I'm trying to figure out how to say this nicely and avoid a flame war in this thread: EVERY command will work just fine regardless of whether the Stamp IIsx is being used as part of our control system or by itself. Many of the commands wouldn't serve a purpose in other situations, but they are legal none-the-less. As for the BS2 vs BS2sx, the only commands supported by the sx not supported by the old stamp are RUN, PUT, and GET. EVERYTHING else will work. Read the Stamp manual if you don't believe me. It's only 353 pages.
cybermind
05-01-2003, 11:24
Kinda shifting the subject on what the BS2 or BS2SX can or can't do, we still can't tokenize the default code innovation first posted. That means two things: either there is a change from the previous years that hasn't been announced yet, (it could even be that they knew ahead of time that parallax would be releasing a new version, and since it is apparently better version, they went with it, but for some reason parallax's new version got delayed), or maybe it means that the default code isn't "plug and play", anymore. (Any one of us who have done programming in another language can easily convert the code, or download the code Noah posted in his "PBASIC Conversion" thread).
PS..
I know rbayer has e-mailed parallax, Has anyone e-mailed innovation, or posted in the FIRST forum
Morgan Jones
05-01-2003, 11:41
I just shot of an e-mail to innovation first... We'll se what they say. I'm half expecting them to say its not their problem and we should talk to FIRST. In any case, I doubt I will receive any response before tomorrow.
Well I poked around the basic stamps yahoo group for a while and i found this post:
No, in the current editor all statements must exist on the same line. We are
in development of a new editor and it does allow lines to be broken. The new
editor should be ready for release in January.
-- Jon Williams
-- Parallax
Sounds to me that he is referring to the new editor for Pbasic 2.5 and hopefully it will be here any day now. I guess the guys at innovation first had a heads up on this and took advantage of it. Personally i think it is awesome, the new version allows do-while, if-then-else, and a lot of other neat stuff! So hopefully they will get the editor out soon! * crosses fingers!*
Jason
Caleb Fulton
05-01-2003, 11:59
I know very little about this programming language, but I'll try to clean up/fix the default code so when i go to RUN, it will give me NO errors. I've done some stuff with c++ (visual and console), turbo pascal, and V.B. before, so I might have some luck...
I had the opportunity to speak with two of the guys from Innovation FIRST the day before kickoff while I was working at the rookie workshop. They told me that the new commands and syntaxes were NOT supported in the current version of the PBASIC software, but that parrallax had promised them a release of a new version on either the 3rd or the 4th. I'm guessing that that release just hasn't happened yet. At any rate, based on the discussions I had with them, the new code should NOT be tokenizing correctly, because the version of the Parrallax PBASIC software that supports it is not out yet.
Raven_Writer
05-01-2003, 12:45
Originally posted by Chris_C
I had the opportunity to speak with two of the guys from Innovation FIRST the day before kickoff while I was working at the rookie workshop. They told me that the new commands and syntaxes were NOT supported in the current version of the PBASIC software, but that parrallax had promised them a release of a new version on either the 3rd or the 4th. I'm guessing that that release just hasn't happened yet. At any rate, based on the discussions I had with them, the new code should NOT be tokenizing correctly, because the version of the Parrallax PBASIC software that supports it is not out yet.
The tokenizing works on my system (I'm not downloading it to a robot, but it tokenizes fine). I'm using the current PBASIC 1.33 Stamp Editor.
Caleb Fulton
05-01-2003, 13:11
Are you using the one- or two-joystick code for the full bot or the code for the edu bot?
I rewrote the culprit parts of the default code and it tolkenizes correctly. If anyone wants it, contact me on AIM (SN=aXvXiA).
Raven_Writer
05-01-2003, 13:13
Originally posted by Caleb Fulton
Are you using the one- or two-joystick code for the full bot or the code for the edu bot?
I rewrote the culprit parts of the default code and it tolkenizes correctly. If anyone wants it, contact me on AIM (SN=aXvXiA).
I think it's 2. I didn't look through it to much, just wanted to know if it compiled fine for me. I think it's full, here's the filename: "2003_EDU_RC_Default.bsx" (Sorry, I'm a newb in the robotics thing)
Originally posted by Raven_Writer
I think it's 2. I didn't look through it to much, just wanted to know if it compiled fine for me. I think it's full, here's the filename: "2003_EDU_RC_Default.bsx" (Sorry, I'm a newb in the robotics thing)
I was speaking about the robot controller code for the real FRC game here, not the EDU bots code. I believe the file you are refering to was the one released with the EDU bots when those were shipped to the teams. I don't think that uses any of the new commands. What I was referring to here was the new default RC code that was released yesterday in conjunction with kickoff. It uses some new commands (in particular IF THEN ELSE statements as opposed to the old IF statements which could only be used to GOTO a label) that are not supported in the old parallax software. I think this is where people were talking about tokenizing errors, but correct me if I am wrong.
Raven_Writer
05-01-2003, 13:59
Oh.....(-.-); D'oh! I think you're right.....but like I said, I'm a newb.
Hey Caleb: did you restructure the innovation first default code to remove the if/else, selects, and do loops? If so could you post that to the white pages here?
Caleb Fulton
05-01-2003, 15:34
"Hey Caleb: did you restructure the innovation first default code to remove the if/else, selects, and do loops? If so could you post that to the white pages here?"
Yes...that's what I did.
The program didn't seem to mind the do loop, but I had to restructure the if/then and switch/case segments. I uploaded it to the white papers, but I don't see it on there, yet...
I assume it has to be screened first :)
Originally posted by Caleb Fulton
The program didn't seem to mind the do loop, but I had to restructure the if/then and switch/case segments.
It didn't complain because it is still valid syntax, it just doesn't do what you think it does: it interprets "do" and "loop" to be labels. If you replace the "loop" with "goto do", it should work just fine.
Caleb Fulton
05-01-2003, 16:04
The program I uploaded to the white papers has some problems with it... I'm using RoboEmu now to try and simulate whether or not it works, and the main loop does not...Can any of you take it off?
Raven_Writer
05-01-2003, 16:08
Isn't there an option for the author of the white paper to take it down?
Originally posted by Caleb Fulton
The program I uploaded to the white papers has some problems with it... I'm using RoboEmu now to try and simulate whether or not it works, and the main loop does not...Can any of you take it off?
See my previous post. After you make the necessary changes, just go to your whitepaper and click "update". It will let you upload a new version and replace the old one as soon as Brandon approves the update.
The cleaned up one is there but the limiter section does not work the same way as the default code. It will only check one limit per loop.
Caleb Fulton
05-01-2003, 18:29
OOPS...you're right...
Caleb Fulton
05-01-2003, 18:41
I believe that this will fix it:
'---------- PWM outputs Limited by Limit Switches ---------------------------
IF rc_sw5 = 1 Then SW5
ChkLimit_Six:
IF rc_sw6 = 1 Then SW6
ChkLimit_Seven:
IF rc_sw7 = 1 Then SW7
ChkLimit_Eight:
IF rc_sw8 = 1 Then SW8
ChkLimit_Nine:
IF rc_sw9 = 1 Then SW9
ChkLimit_Ten:
IF rc_sw10 = 1 Then SW10
ChkLimit_Eleven:
IF rc_sw11 = 1 Then SW11
ChkLimit_Twelve:
IF rc_sw12 = 1 Then SW12
ChkLimit_Thirteen:
IF rc_sw13 = 1 Then SW13
ChkLimit_Fourteen:
IF rc_sw14 = 1 Then SW14
ChkLimit_Fifteen:
IF rc_sw15 = 1 Then SW15
ChkLimit_Sixteen:
IF rc_sw16 = 1 Then SW16
goto Done_With_Limiter
SW5:
p3_y = p3_y MAX 127
goto ChkLimit_Six
SW6:
p3_y = p3_y MIN 127
goto ChkLimit_Seven
SW7:
p4_y = p4_y MAX 127
goto ChkLimit_Eight
SW8:
p4_y = p4_y MIN 127
goto ChkLimit_Nine
SW9:
p1_wheel = p1_wheel MAX 127
goto ChkLimit_Ten
SW10:
p1_wheel = p1_wheel MIN 127
goto ChkLimit_Eleven
SW11:
p2_wheel = p2_wheel MAX 127
goto ChkLimit_Twelve
SW12:
p2_wheel = p2_wheel MIN 127
goto ChkLimit_Thirteen
SW13:
p3_wheel = p3_wheel MAX 127
goto ChkLimit_Fourteen
SW14:
p3_wheel = p3_wheel MIN 127
goto ChkLimit_Fifteen
SW15:
p4_wheel = p4_wheel MAX 127
goto ChkLimit_Sixteen
SW16:
p4_wheel = p4_wheel MIN 127
Done_With_Limiter:
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.