Beaglebone Black new bwbasic-3.2a and relay cape program


Fully working Bwbasic-3.2a & relays.bas to test and
operate and get the status of the relays on the cape.

Note this version corrected issues with version 2.2 & 3.2
which is the version you get 2.2 if doing a
sudo apt install bwbasic from the command line in Debian.

When all done only two executable files are created.


Any issues open a new Issue in GitHub. Feedback is
also welcome.

This has been fully tested on the Beaglebone Black
running Debian 9 & 10.

This also works on other Linux platforms like Ubuntu,
Raspberry, Linux Mint, Zorin OS, Linux Lite, etc. but
no cape support of course.

As a side after installing Bwbasic-3.2a checkout the
BAS-EXAMPLES folder for examples of the many abilities
of Bwbasic aside from working on relays. If you desire
more info check out what’s available in the INFO folder.



I have included some runtime files and sample input files.
Place profile.bas in your current working directory and and allon.inp and alloff.inp. The file examples
will let you to by example turn off all relays alloff.inp.
To do this you would enter at the command line:

bwbasic --profile --tape alloff.inp relays.bas

To turn all relays on:

bwbasic --profile --tape allon.inp relays.bas

To work interactive you would:

bwbasic relays.bas

All the above can placed into a simple script file.

The purpose of is to redirect standard and error
outputs to files relays-stdout.txt and relays-error.txt and
to turn off ANSI so the output is easily readable without
escape codes. Using then gives you a quiet display
suitable when scripts via .inp is executed.

The purpose of profile.bas which is used by default is to
enable ANSI control sequences so the command ‘cls’ works
and to set the normal editor to nano which if desired can
bet set to vi. The editor comes into play when creating
or changing a .bas file. To use while running bwbasic you
would issue the command edit.

Again all this is available at: