Unofficial FLL FAQ06-c - Mindscripts

UFAQ Table of Contents

Q15.1) Please tell me something about Mindscripts!
A) Mindscripts is the foundation for the Robot Invention System (RIS) software. Under the pretty pictures, RIS uses Mindscripts to store its programs and to convert them into code that can be downloaded to the RCX. It is possible to bypass the pretty pictures interface of RIS and program directly to Mindscripts. In doing so, you gain access to much more capability at the expense of a more complicated text based language.

Q15.2) Is it legal?
A) This legality of Mindscripts has been debated in past years. The final verdict from FIRST is that it is legal. It is not called out explicitly as a legal language due to it being a part of RIS that is listed.

Q15.3) What resources are available?
A) The following section is courtesy of Jon Gilchrist

I've been playing with Mindscript since last FLL season. Although I like the text-based language, it is not very user friendly. The kids on my team have decided to stick with RIS code.

In searching for resources, I have found precious few sources of info about Mindscript. The best by far is the documentation included with the SDK. You can get the SDK here:

http://mindstorms.lego.com/sdk2point5/default.asp

Be sure to read both the pdf docs and the help file.

One other source is from a group in the UK called Robofesta. They have a tutorial, though it is incomplete.

http://robofesta.open.ac.uk/lsc/

There is a website aimed at Spybotics that also includes programming in Mindscript. It doesn't like browsers that aren't IE.

http://users.ncable.net.au/~blane/smartParts/

Other Tools:

An essential tool, and one that is useful even if you don't use Mindscript or NQC, is BricxCC. The virtual remote and virtual joystick are indispensable, and the piano is great fun.

http://bricxcc.sourceforge.net/

That is the bulk of the information that exists. Here are a few tidbits that I have learned:
  1. If you write something in Mindscript, make sure you have a backup copy before you open it in RIS. RIS will re-write your code, renaming everything and basically hosing up formatting. It will also wrap everything in "try..." commands.
  2. If BricxCC or the compiler is giving you an error, look at the line after or before where it says the error is. Sometimes a typo will trigger an error on a different line.
  3. Learn to use Macros and #include files. They will make your life easier and your code much easier to debug and understand.
  4. Once you get a macro or code block that works, don't mess with it.
  5. Create a macro that initializes everything, and use it at the beginning of your program.
  6. You can write Mindscript code in any text editor and transfer it to BricxCC using any reasonable means. I program on my iPaq, and store programs on CF and SD memory cards. I can program in line at the grocery store, soccer practice, just about anywhere.
  7. Learn to use Datalogging. It is about the most useful debugging tool that I have found. You can record sensor values at different times, and then examine them later. Figure out exactly what your light sensor or rotation sensor was reading!
  8. Use lots of comments. Use a block at the beginning to explain what the program does and what uses and what dependencies it has. This will be important 3 months later when you try and figure out what the program does.


UFAQ Table of Contents
Home

Disclaimer: This FAQ is not an official FIRST document. It is an accumulation of knowledge derived from six thousand messages posted to the FLL forum over three seasons. It has been reviewed by numerous people, but may still contain errors. Use at your own risk.
Readers are encouraged to submit errors, suggested wording changes, new topics, or comments to Skye Sweeney at skye@fll-freak.com
Copyright 2003-2006 Skye Sweeney; Last Updated on 10/28/2006