Introducing Bitlash
Bitlash is an open source interpreted language shell for the Arduino serial port. It runs on the Arduino and interprets commands that you type in a terminal window or send programmatically:
bitlash v0.95a here! ... > print "hello, world", analogRead(3) hello, world 552Bitlash is 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. 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.
void setup(){
pinMode(13, OUTPUT);
}
void loop(){
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
First, we configure pin 13 for output by setting a bit in Data Direction Register B. Then we turn pin 13 by setting its bit in PORTB. Then we delay 500 milliseconds by marking the current value of timer0, converted into milliseconds, and letting the counter be incremented repeatedly at each clock cycle and overflowed into ever larger holders until the new value of timer0 represents an elapsed time of 500ms. Next we set the bit for pin 13 in PORTB low to turn the LED off. We do the delay dance again and we're home.