Pages: [1]   Go Down
Author Topic: running bitlash scripts from the arduino on the arduino without serial input  (Read 385 times)
0 Members and 1 Guest are viewing this topic.
Kamchatka, Russian Federation
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: March 20, 2013, 06:07:25 pm by KatjaD » Logged

~KVD

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11176
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Jr. Member
**
Karma: 3
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
// 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

Logged

Kamchatka, Russian Federation
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

~KVD

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Cheers,

-br
Logged

Kamchatka, Russian Federation
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Cheers,

-br




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.
Logged

~KVD

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How cool is that.  Thanks!

-br
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

very nice project!  smiley
Logged

Pages: [1]   Go Up
Jump to: