Parallax Boe-Bot Student Manual page 48

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Page 34 · Robotics with the Boe-Bot
Example Program – AsciiName.bs2
Enter and run AsciiName.bs2.
Remember to use the toolbar icons to place Compiler Directives into your programs!
'{$STAMP BS2} -
'{$PBASIC 2.5} -
You can see a picture of these icons again on page 24.
' Robotics with the Boe-Bot - AsciiName.bs2
' Use ASCII code in a DEBUG command to display the words BASIC Stamp 2.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG 66,65,83,73,67,32,83,116,97,109,112,32,50
END
How AsciiName.bs2 Works
Each letter in the
DEBUG
in the Debug Terminal.
DEBUG 66,65,83,73,67,32,83,116,97,109,112,32,50
66 is the ASCII code for capital "B", 65 is the code for capital "A" and so on. 32 is the
code for a space between characters. Notice that each code number was separated with a
comma. The commas allow the one instance of
separate command. This is much easier to type than 12 separate
Your Turn – Exploring ASCII Code
Save AsciiName.bs2 as AsciiRandom.bs2
Pick 12 random numbers between 32 and 127.
Replace the ASCII code numbers in the program with the numbers you chose.
Run your modified program to see what you get!
The BASIC Stamp Manual Appendix A has a chart of ASCII code numbers and their
corresponding symbols. You can look up the corresponding code numbers to spell your
own name.
Use the diagonal green electronic chip icon
Use the gear icon labeled 2.5.
command corresponds to one ASCII code symbol that appeared
.
to execute each symbol as a
DEBUG
commands.
DEBUG

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Boe-Bot and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF