Closed joelbyler closed 11 years ago
No. This gem isn't about transcompiling Ruby code to Arduino code. All the included Arduino bootstrapper does is provide an API for calling low-level Arduino functions and libraries over a serial connection. The Ruby gem wraps this API and adds logic for common components. All your program logic is in Ruby and needs the board to be connected.
The bootstrapper is written as an Arduino library, so what you're asking might be possible. Try this:
loop
function of the bootstrapper, after everything that's already there.In theory, that will give you a board with the standalone functionality you transcompiled and burnt onto it, while still being able to control it over serial with the dino API. Replacing everything in loop
will let you disable external control.
Check out rad
for Ruby -> Arduino transcompiling: https://github.com/atduskgreg/rad
How can I burn my ruby script to the device so it will run automatically the next time it is powered up (not connected to my computer).
I think normally an arduino will start executing the last sketch that was 'uploaded' to it when it is powered on. When I use dino to write my sketches in ruby, it doesn't really seem to do anything. Is there a way to do this in ruby or is it a limitation of this approach?