Go Down

Topic: running bitlash scripts from the arduino on the arduino without serial input (Read 478 times) previous topic - next topic

KatjaD

hello. i'm using a  scripting language called Bitlash. it's a standard scripting language with the ardiuno. it allows me to put scripts on an SD card connected to the ardiuno, and run them. the only problem is that... i'm making a digital watch.... which won't be plugged into the computer. for these bitlash scripts to be run, you have to tell bitlash to run them via the serial port where an ardiuno is hooked up to a computer.

is there any way i can emulate a serial com port to tell bitlash to execute these scripts.. while not having to hook anything up to a computer to give commands? is there any other way to do this?
~KVD

PeterH

The Bitlas User's Guide says:
Quote

A user-defined bitlash startup function is run automatically at bootup.


I haven't used bitlash myself, but that seems to give you the option to arrange for your script to be run automatically at startup. If that isn't sufficient for some reason, you do also have the option of incorporating bitlash into your own sketch so that you can make it do whatever you want.
I only provide help via the forum - please do not contact me for private consultancy.

TMRh20

You may want to take a look at the bitlash API as well:

https://github.com/billroy/bitlash/wiki/api

billroy

PeterH has it right: you define a Bitlash function named "startup" to run anything you want to be started up at boot time.  Here's an example:

Code: [Select]

// Blink:
function t13 {d13=!d13}
function startup {pinmode(13,1); run t13,500}


You can see lots of short bitlash programs with examples of startup functions here: https://github.com/billroy/bitlash/blob/master/bitlashcode/bitlash-one-liners

-br


KatjaD

thank you. i took a look at the api.. and it looks like doCommand(); is what i'm looking for. it's not that i want a startup script to run..i want my watch to have a menu of scripts.. and i scroll down and choose one with buttons.. and then i execute the selected script when i press the select button. it looks like i can just tell the doCommand(); function to execute a script when ever i want to.
~KVD

billroy

That will work, too.  Good luck with your project.  I'd love to see pictures when it's working.

Cheers,

-br

KatjaD


That will work, too.  Good luck with your project.  I'd love to see pictures when it's working.

Cheers,

-br



http://www.youtube.com/watch?v=EOjzjn7XncY

here's a quick video i took of it. i haven't finished much of it. as it says in the description, i don't have enough buttons to operate the menu on the watch. so everything is on pause while i wait for a 5 way button thing to ship out to here.
~KVD

billroy



Go Up