SERVO 03.2018 41
To post comments on this article and find any associated files and/or downloads, go to
multidimensional arrays. You can use both 2D and 3D
graphics, as well as GUI features like buttons and sliders
to enhance the user experience with your programs.
Furthermore, you’ll have a full range of debugging
capabilities and hundreds of specialized functions that
simplify complex tasks.
RobotBASIC’s integrated robot simulator allows you
to develop algorithms and even complete programs in a
controlled environment, and then use them with minimal
modification to control the S3. A welcome feature is that
programs do NOT have to be downloaded to the S3. Just
write your code, click RUN, and the S3 immediately
The unit shown in Figure 2 is readily available on
eBay. It can be attached to the S3 with double-sided tape
as shown in Figure 3.
For many robot hobbyists and schools, this is an ideal
combination — especially since the S3 comes fully
assembled and ready to use. RobotBASIC needs to
communicate with the embedded RROSS though, so at a
minimum, a Bluetooth transceiver must be added.
Power for the transceiver is available on the hacker
port. The TXD and RXD (transmit and receive) pins on your
Bluetooth device should connect to hacker port pins P0 and
Let’s explore how easy it is to write RobotBASIC
programs for the S3. Look at the small program in Figure 4
which produces the output shown in Figure 5.
gosub DrawObjects rLocate 400,500,random(360) rInvisible GREEN rPen DOWN while TRUE d = rFeel()&14 if d = 8 rTurn 45+random(30) elseif d = 2 rTurn -(45+random(30)) elseif d = 4 rTurn 160+random(40) else rForward 1 endif wend
DrawObjects: rectangle 150,150,250,200,RED,BLACK rectangle 500,200,600,400,RED,BLACK circle 250,400,350,500,RED,BLACK return