Difference between revisions of "Project:Nanode/Bitlash"

From London Hackspace Wiki
Jump to navigation Jump to search
(Created page with "To install Bitlash 2.0 RC3d on a nanode you need to do the following Edit libraries/bitlash/src/bitlash-instream.c to turn off the SDFILE define at or near line ...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
To install Bitlash 2.0 RC3d on a nanode you need to do the following
 
To install Bitlash 2.0 RC3d on a nanode you need to do the following
  
Edit libraries/bitlash/src/bitlash-instream.c to turn off the SDFILE define
+
Edit libraries/bitlash/src/bitlash-instream.c to turn off the SDFILE define at or near line 32, make this:
                at or near line 32, make this:
+
    #define SDFILE
                        #define SDFILE
+
look like this:
                look like this:
+
    //#define SDFILE
                        //#define SDFILE
+
 
        - Restart Arduino 0022, open examples->bitlash->bitlashdemo and upload to your Arduino
+
Now restart Arduino 0022, open examples->bitlash->bitlashdemo and upload to your Arduino
 +
 
 +
 
 +
---
 +
 
 +
Plan of action
 +
 
 +
*setup a webserver on the nanode
 +
*use bitlash library to init and run bitlash
 +
*filter for URL that has <nowiki>http://<ip>/RESTbitlash/<command></nowiki>
 +
**grab everything after /RESTbitlash/
 +
**use doCharacter(char c) to pipe each char to the bitlash console, one at a time
 +
 
 +
The REST interface will be designed to handle only one line of bitlash command at a time.
 +
 
 +
For a multi line program, the REST interface should be called until the program is complete.
 +
-This can be achieved by having input in a textbox in a webpage that takes the source as input. Some javascript(?) can then take the text, and send it a line a time to the REST interface.
 +
 
 +
 
 +
---
 +
 
 +
initial attempt can be found here
 +
 
 +
https://github.com/amx109/RESTbitlash

Latest revision as of 00:03, 18 July 2011

To install Bitlash 2.0 RC3d on a nanode you need to do the following

Edit libraries/bitlash/src/bitlash-instream.c to turn off the SDFILE define at or near line 32, make this:

   #define SDFILE

look like this:

   //#define SDFILE

Now restart Arduino 0022, open examples->bitlash->bitlashdemo and upload to your Arduino


---

Plan of action

  • setup a webserver on the nanode
  • use bitlash library to init and run bitlash
  • filter for URL that has http://<ip>/RESTbitlash/<command>
    • grab everything after /RESTbitlash/
    • use doCharacter(char c) to pipe each char to the bitlash console, one at a time

The REST interface will be designed to handle only one line of bitlash command at a time.

For a multi line program, the REST interface should be called until the program is complete. -This can be achieved by having input in a textbox in a webpage that takes the source as input. Some javascript(?) can then take the text, and send it a line a time to the REST interface.


---

initial attempt can be found here

https://github.com/amx109/RESTbitlash