BoneScript is a Node.js library specifically optimized for the Beagle family and featuring familiar Arduino function calls, exported to the browser. Get started exploring the BoneScript Library to discover the great simplicity that is made possible by utilizing Linux.
- BeagleBone Cookbook
- Bad to the Bone: Crafting Electronics Systems with BeagleBone and BeagleBone Black (Amazon)
- Getting Started with BeagleBone
- Node: Up and Running
The BoneScript library provides several functions useful for interacting with your hardware. Browse the menu to the left for examples to get you started.
- var timer = setTimeout(callback, milliseconds)
- var timer = setInterval(callback, milliseconds)
The BoneScript Library runs in Node.JS. You can run it directly on the board using the 'node' interpreter or the Cloud9 IDE that invokes the 'node' interpreter. You can also run it using the bonescript.js script within your browser via remote procedure calls using Socket.io and served up by the web server running on your Beagle.
Access to the library functions is provided through the "require('bonescript')" function call. The call returns an object containing all of the functions and constants exported by the library. The Node.JS API documentation on modules provides more information on the usage of 'require' within the 'node' interpreter.
To learn more about Cloud9 IDE and to synchronize the software on your board with cloud-hosted services, see www.c9.io.
The source code for BoneScript is hosted at Github.com/jadonk/bonescript.