Vintage Computing
It really is that simple! If you have a youngster
watching over your shoulder, press <F1> again to go
into the editor and have him or her change WORLD
in Line 100 to their name, then press <F1> again.
Now, watch those young eyes light up as the Amigo
screen fills up with personalized multicolor greetings!
Here’s one more example of Amigo simplicity
and fun to help get you started. Type NEW at the
READY prompt to clear program memory and
variables, then press <F1> for the editor and enter
this code:
FIGURE 7: Greetings from the Mentor’s Friend!
<Esc> to interrupt Color BASIC, and type in SAVE
“ HELLO.BAS” to save your first program to the SD card.
Next, type DIR to view a directory of the files on the SD
card. You should see an entry for HELLO.BAS. You can now
10 CLS
20 PRINT “AMIGO SIMPLE I/O”: PRINT “ “
30 PRINT “CONNECT S1 TO P8”
40 PRINT “CONNECT D1 TO P9”
50 PRINT “PRESS S1, AND D1 SHOULD BLINK”
60 REM LOOP TO CHECK FOR BUTTON PUSH ~~~
70 IF INA[8]=1 THEN GOSUB 100 REM -
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘1’=PUSHED
80 GOTO 70
90 REM SUBROUTINE TO BLINK LED ONCE ~~~
100 OUTA[9]=1 REM - ‘1’= LED ON
110 PAUSE 250 REM - WAIT 250MS
130 OUTA[9]=0 REM - ‘0’= LED OFF
140 PAUSE 250 REM - WAIT 250MS
150 RETURN
LOAD “ HELLO.BAS” from the SD card, then RUN it to see
it work, or LIST it to see the program code (Figure 7).
Press <F1> again to run the code, install two wire
jumpers as instructed, then press switch
S1. If all goes well, LED D1 should blink
while you hold down the button, and
stop when you release it. If not, check
your jumpers. I know it’s easy for me to
misalign jumpers on the headers
without a magnifier or my readers.
When you’re ready to try
something different, press <Esc> to
return to the READY prompt, and don’t
forget to save your work with SAVE
“ BLINK.BAS.” Figure 8 shows my Amigo
sending you greetings via a red LED.
This little program uses two jumper
wires to demonstrate the Amigo version
of the HELLO WORLD program of
microcontrollers: the blinking LED.
Setup is simple — just two wires — and I
hope you think the program code is
simple and intuitive.
FIGURE 8: More
greetings from the
Mentor’s Friend!
No separate computer and
integrated development environment
(IDE), no compiling code and
programming chips, and no dedicated
microcontroller programming language
to learn.
42 December 2015