README.IC Readme file for Interactive C, version 2.850 Randy Sargent Anne Wright July 29, 1994 Thanks for using IC! The IC software system was written by Randy Sargent (rsargent@media.mit.edu) and Anne Wright (anarch@media.mit.edu) It makes use of a pcode interpreter and drivers that live on the robot board, which was written by Randy Sargent, Fred Martin, and Anne Wright. This version of IC is freeware and unsupported. It is provided as a service to hobbyists and educators. This version does continue to be updated and have reported bugs fixed, but most of our effort now goes into a newer IC (version 3.0+), which includes features such as structs, multidimensional arrays, and a built-in preprocessor. Versions 3.0 and above are sold by Anne and Randy out of our apartment in hopes we can support ourselves doing cool robotics hardware and software; it is not freeware (sorry), but at least it does come with support :) This free version IC is still very functional, having been used for years by the MIT LEGO Robot Design contest. Updates to free IC (versions < 3.0) are available by anonymous FTP to cher.media.mit.edu in pub/interactive-c. Information for obtaining more recent versions of IC is included with the IC software. Recommendations on hardware: This software was designed to be compatible with the 6811-based Rev 2.x robot controller designed at MIT for the LEGO Robot Design Competition. (designed by Fred Martin and Randy Sargent). It also works with the Rug Warrior from Mobile Robotics:Inspiration to Implementation, by Joe Jones and Anita Flynn (highly recommended reading!) Our experience founding the MIT LEGO Robot Design Competition suggests that only about 50% of boards assembled from kit work the first time. For this reason, Anne and Randy strongly recommend that you buy completed and tested hardware. We get lots of messages from folks saying "Nothing works. What's wrong?" Future versions of the software may come with more diagnostics (currently there's only testbrd.c), but we regret that we really can't help people debug their hardware remotely. Talk to the folks who sold you the kit. We have had some requests from people who are desperate to get their boards up, and they have sent us their boards and had them repaired, for a fee. Hopefully other people (maybe students) can offer this service cheaper than we can; but if you want us to fix your board, you can send it, along with $100 for Rev 2 + expansion board, or $75 or Rev 2 without expansion, or Rug Warrior, to: Randy Sargent 2 Newton St Apt. #1 Cambridge, MA 02139 (617) 547-6664 I really wish I could do it cheaper, but it takes some time and I have to pay rent :(. We hope you are successful in playing with robotics, and hope that IC is useful to you! Randy Sargent and Anne Wright July 29, 1994 ========================================================================== Quick start for PC users: 1. Installation Copy the contents of the floppy onto your hard drive, into a directory called \ic: xcopy a:\ic c:\ic /s Does BAR specify a file name or directory name on the target (F = file, D = directory)? D 2. Instructions for installing IC for use in Microsoft Windows If you want to use Microsoft Windows, be sure to copy the .pif files from \ic to your windows directory (probably \windows) like so. (Do this after step 1). copy c:\ic\*.pif c:\windows It is very important that you have the .pif correctly installed. If you have to write your own, be sure it runs in full-screen mode, with the "Exclusive" option set and "Background" option NOT set. Otherwise you will lose synchronization with the board. (You can still swap between IC and other programs, such as your editor, using Alt-Tab). 3. Getting started with IC 3.1 Downloading Pcode: You must first download the pcode interpreter to your robot board. Connect it to the computer's serial port, and type: dl pcoder22.s19 (for Rev 2.21 board) OR dl pcoderwl.s19 (for Rug Warrior) If you need DL to talk to a serial port other than com1, do it like this: dl pcoder22.s19 -port com3 (You can reconfigure dl to use a different port by default by cd'ing to /ic and typing dl -config. DL will prompt you to change different parameters. This actually mutates the executable, so be sure to back up dl.exe before doing this. Just press RETURN for options you don't want to change.) DL has built-in help, if things aren't clear or aren't working. If DL doesn't work, probably your board doesn't work or the serial cable is configured improperly. The built-in help has some hints for diagnostics if you're using the MIT Rev 2.2x board. Once you're done with DL, press the reset button and your board should beep and display a message on the LCD screen. (If you hear a beep but see no message, try adjusting the LCD contrast knob or try resetting again). 3.2 Starting IC Probably the most convenient way to run IC is under Microsoft Windows. Be SURE to read the above installation instructions for getting the pif right. You have to have a special pif installed to run IC full-screen and in exclusive mode without background processing, or you will get lose synchronization with your board. When you run under windows, you can type Alt-Tab to switch between different applications (such as your editor). By default, IC will use com1. If you need IC to use a different serial port, you can run it with arguments like so: ic -port com2 or you can cd to /ic and run "ic -config" to reconfigure ic.exe (read the earlier description for reconfiguring dl.exe). To start IC under windows, you can choose "Run" from the "File" menu in the program manager, and type IC in the dialog box. Be sure your board is already hooked up, and running pcode. If you are in plain DOS, just type "ic". If everything goes well, you should see libraries load, and get a prompt like so: C> (not to be confused with the DOS prompt) You can type any expression: C> 2+2; Returns 4 C> beep(); -- should make the board beep if it has a buzzer C> printf("Hello world!\n"); -- should print Hello world! on the LCD screen C> load music.c -- loads the music library C> { pp(); looney_tune(); } -- plays pink panther on the buzzer, followed by a cartoon song If you don't have it, you should get a copy of the IC manual. It is should have come with this software; if not, you can get a copy from cher.media.mit.edu in pub/interactive-c Your next steps might be to try some of the motor and sensor primitives, and then to start writing functions. You need to use an editor to create and edit a .c file; you can use the standard "edit" that comes with your PC, or you might have a better time with an editor which automatically indents C code and shows matching parenthesis (like the freely available emacs, or the pay software epsilon or brief). If you're in Windows, you can switch between IC and your editor using Alt-Tab; otherwise, you'll need to quit IC to enter your editor. To load (or reload) files you've written in your editor, simply type C> load filename.c from IC. Good luck using IC! Randy Sargent Anne Wright