Page 283 - Hacking Roomba
P. 283

264       Part III — More Complex Interfacing




                             The Basic Stamp Environment

                             Figure 13-5 shows the Parallax Basic Stamp development environment with a typical “Hello
                             World!” type of program for microcontrollers. Of course, the first program you write on a nor-
                             mal computer that verifies everything is working is to print out “Hello World!” to the screen.
                             With a microcontroller, instead of saying “Hello World!”, the first program you create verifies
                             functionality by blinking an LED.
























                             FIGURE 13-5: Basic Stamp editor in Windows


                             In PBASIC, the HIGH and LOW commands cause a pin to go to 5V or 0V, respectively. In
                             Figure 13-5, pin 0 (P0) is brought high for half a second, then low for half a second, and then
                             the program loops. Figure 13-6 shows the MacBS2 environment for programming Basic
                             Stamps on Mac OS X with the same sort of “Hello World!” program but with a slightly differ-
                             ent style. MacBS2 isn’t as feature-rich as the official Parallax Basic Stamp IDE, but it is very
                             easy to use and works very well.

                             MacBS2 was written by Murat N. Konar and not Parallax. It is free to use and can be down-
                             loaded from www.muratnkonar.com/otherstuff/macbs2/.




                             If you use Linux and want to program Stamps, check out the Basic Stamp Tools for Linux at
                             http://bstamp.sourceforge.net/.
   278   279   280   281   282   283   284   285   286   287   288