-
Notifications
You must be signed in to change notification settings - Fork 73
Home
Welcome to the Bitlash Wiki.
Bitlash is an open source interpreted language shell and embedded programming environment. This website documents Bitlash for the popular and useful Arduino.
The Bitlash interpreter runs entirely on the Arduino and interprets commands that you type in a terminal window or send programmatically to the serial port:
bitlash here! v2.0 (c) 2012 Bill Roy -type HELP- 942 bytes free
> print "Hello, world!", millis()
Hello, world! 11939
>
- Download Bitlash
- Install Bitlash and upload it to your Arduino
- Proceed to the Documentation Index
- Jump to the Built-in Functions Reference page
- Read more About Bitlash
Bitlash is an open source interpreted language shell and embedded programming environment. This website documents Bitlash for the popular and useful Arduino.
The Bitlash shell runs entirely on the Arduino and supports many of the familiar Arduino functions. Bitlash interprets commands you type on the serial port:
bitlash here! v2.0 (c) 2012 Bill Roy -type HELP- 978 bytes free
> print "Hello, world!", millis
Hello, world! 10161
>
It's easy to extend Bitlash by naming a sequence of commands as a Bitlash function, which is like a new word in the Bitlash language. A Bitlash application is a set of such functions, and since they are stored in the EEPROM, Bitlash can start up your application automatically at boot time for standalone operation.
In cases where you need native C code to get closer to the hardware, perhaps for speed or to interface with a custom peripheral, it's also easy to integrate your C code with Bitlash as a User Function.
As scripting languages are to Internet applications, Bitlash is to embedded ones. Test your embedded C code by interacting with it through Bitlash userfunctions over your Arduino's USB or serial interface. Configure and manage your application from Bitlash rather than some hokey syntax that you cooked up for that one purpose, that's already getting in the way and won't make any sense to you when you need to extend it six months from now.
At the low end, Bitlash runs fine on an Arduino Uno, leaving most of the space for your app. On an Arduino Mega 2560, large Bitlash apps are possible. Examples include a Bitlash-powered webserver and interacting with Bitlash via telnet.
Read on for more about Bitlash.
The Bitlash embedded interpreter that runs in about 14k of memory on an Atmel AVR processor. It works nicely with Arduino to make a development and prototyping tool for those situations where you need to bang some bits on the Arduino but writing a sketch in C is premature. It's very convenient for bringing up and debugging new hardware.
The Bitlash command language is very similar to Arduino C and includes a large repertiore of the familiar Arduino C functions so you can hack your hardware from the serial command line or even over the internet via telnet.
You can store commands as functions in EEPROM, compile them into flash memory, or put them on an SD card. A user-defined bitlash startup function is run automatically at bootup, making the automation and maintenance of small applications very easy. Here is the classic Blink13 program as a complete Bitlash application in two functions, toggle13 to toggle the led and startup to initialize and run it:
> function toggle13 {d13=!d13;}
> function startup {pinmode(13,1); run toggle13,1000;}
> boot
(d13 toggles every 1000ms)
Bitlash and this Bitlash documentation are Copyright 2012 by Bill Roy.