Blink LED
Traditionally this is the first program on an embedded controller, much like 'Hello World.' in a desktop programming language.
Type 'e' to enter the editor and type the code listed below.
'Blinky, flash the Red LED
RedLED=41
pinmode RedLED, out 'Pin 41 as output pin
repeat
outd RedLED, 0 ' Turn LED on
wait 100 ' do nothing for 100ms
outd RedLED, 1 'LED off
wait 100
until inkey > -1
end
Press Ctrl-W and 'y' to save the program. Press 'r' to run the program and see the LED flash on 5 times per second. Press any key on the keyboard to end the program.
Note that there is no 'GOTO' command or line numbers in the program. The version of BASIC used on the EZSBC does not require line numbers or the use of GOTO commands. The GOTO command is supported but should be used sparingly. The target of GOTO or GOSUB commands are labels that can appear at the beginning of any line or on lines by themselves.
For other commands and syntax see BASIC Reference.