-
Notifications
You must be signed in to change notification settings - Fork 73
commands
Here is an alphabetical reference list of Bitlash commands. (See also Bitlash functions.)
If you type a "naked expression" it will be evaluated, and any side effects like function calls and function executions will happen, but nothing is printed unless you say so using print. For example:
> d13=1; delay(125); d13=0
>
Your code is executed (d13 goes high for 125 ms), but all you see on the console is the command prompt after it's done.
Resets the Arduino. On restart, the startup function will run, if one is present.
Defines a new Bitlash Function to be stored in EEPROM.
Note: Earlier versions of Bitlash defined macros using a different syntax.
Bitlash functions have their own section.
> function blip {d13=!d13;}
> ls
function blip {d13=!d13;}
> rm blip
> ls
>
Help displays a short help message that can be helpful if you forget the name of a command or function. It also displays a list of your functions via 'ls'.
The while and if commands have their own section.
List all the functions stored in EEPROM.
> function blip {d13=!d13;}
> ls
function blip {d13=!d13};
Peep prints a map of eeprom usage. This can help you see how full your EEPROM is, and whether you have fragmented free space.
> peep
E000: foo\ prin t #4 :".^ ",\b lip\ d13= !d13 \cc\ ^^^\ t13\ d13= !d13 ;sno oze 100\
E040: b0\b lip; snoo ze(i *i); if + +i>m :i=- m\st artu p\ru n t1 3\al fa\a bcde fghi
E080: jklm nopq rstu vwxy z\cl s\pr int #4:" xfe^ ",\. .... .... .... .... .... ....
E0C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E100: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E140: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E180: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E1C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
Note that the "E000" address is actually EEPROM address 0000. Subtract 0xe000 from the addresses shown.
print [#pin:] [expr], -- print
In its simplest form: print foo,bar will get you started. But print has a lot of options, so please see the section on Printing for details.
Ps shows a list of running background functions.
> run t13
> ps
0: t13
> function blip {d13=!d13;}
> ls
function blip {d13=!d13;}
> rm blip
> ls
>
Use "rm *" to erase the whole EEPROM.
See the section on Background functions for details.
> run t13,125
> ps
0: t13
Stop a background task by number, stop the current task, or stop all tasks.
> run t13
> ps
0: t13
> stop 0
> ps
>
The switch statement is described in Conditionals.
The while and if statements have their own section.
Bitlash and this Bitlash documentation are Copyright 2012 by Bill Roy.