Overview | Info/Download | Documentation | Sample Projects 
Making a GoGo board | Board Variations | Links | FAQ
 



GoGo board library for Microworlds Logo
Multi-threaded version

Manually Initializing the Library

by Arnan (Roger) Sipitakiat
arnans@media.mit.edu

Please visit http://learning.media.mit.edu/projects/gogo for the latest version of this document.


 

Understanding how the library works

The GoGo library is written entirely in Logo. I could have put the code in the procedures page, but it would clutter the screen. To avoid this mess, the Logo procedures are kept in a separate text file instead. So, you need to load this file into Microworlds before you can use it.

The library requires you to initialize it once before use. This is easily done by calling "gogoinit"  It setups all the necessary variables and opens the serial port.

The last requirement is you need to keep a procedure called "GoGo" running while communicating with the GoGo board. This procedure makes sure that all commands are properly delivered to the GoGo board and handles scheduling when multiple commands are accessing the GoGo board at the same time.

 

How to initialize and use the GoGo library

  1. Load the GoGo library procedures into Microworlds.
    .ask "sys [evalstring filetostring "gogo_mt.txt]
    • gogo_mt.txt is the text file holding the procedures. You may need to change the file name according to the version of the library you are using.
    • Notice the "dot" preceding the ask command.
    • If you get an error message like:
      filetostring does not like gogo_mt.txt as input 

      This means it cannot find the text file. Please verify the filename and make sure it is located in the same folder as the Microworlds project file.

     

  2. Initialize the library
    gogoinit

     

  3. Before using any GoGo commands, run the "GoGo" procedure. You can do this by creating a button with the instruction "GoGo" and running "many times." Or you can use the command
    forever [GoGo]

 

Note:

  • Step 1. and 2. need to be executed only once. But step 3. needs to be running every time you communicate with the GoGo board.
  • In the GoGo template, step 1 and 2 are called in the "Startup" procedure which is a Microworlds special procedure that runs automatically every time the project is loaded.

 

 

 Last updated: 2/21/2003 6:13:38 PM