MT-DB-U4
User Guide
Running Bitlash Demo
Running Bitlash Demo
Bitlash is an open source interpreted language shell and embedded programming
environment. The preinstalled Bitlash demo was compiled in the Arduino environment and supports
Arduino functions (ie: dw() for digitalWrite()). A terminal emulator (recommended) or the Arduino serial
monitor may be used. See the CDC Bootloader section for details on installing the CDC Serial driver.
The following example saves three functions to EEPROM. It is then run in the background, pulsing the
LED using analog write (PWM):
bitlash here! v2.0RC4 (c)2011 Bill Roy, bitlash.net -type HELP- 1706 bytes free
> print free, " bytes free"
1702 bytes free
> pinMode(25,1)
> d25=1
> x=255;d=0;
> function brighter {if (x==255) {d=0;} else { a25=++x; snooze(2);}}
saved
> function dimmer {if (x==0) {d=1;} else {a25=--x; snooze(2);}}
saved
> function pulseLED {if (d==0) {dimmer();} else {brighter();}
saved
> ls
function brighter {if (x==255) {d=0;} else { a25=++x; snooze(2);}};
function dimmer {if (x==0) {d=1;} else {a25=--x; snooze(2);}};
function pulseled {if (d==0) {dimmer();} else {brighter();};
> run pulseled
> ps
0: pulseled
> stop 0
>
Documentation for Bitlash is available at
http://bitlash.net/wiki/docindex
Commands
arg else function help if ls peep print ps return rm run stop switch
while
Functions
abs ar aw bc beep br bs bw constrain delay dr dw er ew free inb
max millis min outb pinmode printf pulsein random shiftout sign
snooze
December 30, 2015
32
http://www.mattairtech.com/