Got something working here, a Frankenstein of a merger but it should suit my needs.
~
/***
bitlash-demo.pde
Bitlash is a tiny language interpreter that provides a serial port shell environment
for bit banging and hardware hacking.
This is an example demonstrating how to use the Bitlash2 library for Arduino 0015.
Bitlash lives at: http://bitlash.net
The author can be reached at: bill@bitlash.net
Copyright (C) 2008-2011 Bill Roy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***/
// This is the simplest bitlash integration.
#include "bitlash.h"
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup(void) {
// initialize bitlash and set primary serial port baud
// print startup banner and run the startup macro
initBitlash(57600);
Serial.begin(57600);
// you can execute commands here to set up initial state
// bear in mind these execute after the startup macro
// doCommand("print(1+1)");
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop(void) {
runBitlash();
if (mySerial.available())
Serial.write(mySerial.read());
}
~