RAD 0.3.1 and Arduino Duemilanove
September 12th, 2011
RAD is a framework for programming the Arduino physcial computing platform using Ruby. RAD converts Ruby scripts written using a set of Rails-like conventions and helpers into C source code which can be compiled and run on the Arduino microcontroller. It also provides a set of Rake tasks for automating the compilation and upload process.
Gem List
Please note that Rad 0.3.0 requires ParseTree version 2.2.0, since Rad 0.3.1 is not fully compatible with ParseTree v3.0.x
hoe (2.12.3) ParseTree (2.2.0) rad (0.2.2) rake (0.9.2) RubyInline (3.10.0) RubyToC (1.0.0.5) sexp_processor (3.0.6) ZenTest (4.6.2)
Source
Original Source Code: atduskgreg / rad
My Fork (rake 0.9.2+ with rspec 2.6.0) rdegraci / rad
OSX Instructions
Download and install the latest OSX Arduino Dev Environment
Download and install the arduino-012 and install into your /Applications folder
rvm gemset create rad031dev gem install rake -v 0.9.2 git clone git://github.com/rdegraci/rad.git rake install_gem --trace ... gem uninstall ParseTree gem install ParseTree -v 2.2.0 rake #run the tests rake install_gem --trace #install the gem locally mkdir ~/testing cd ~/testing rad BasicBlink cd BasicBlink vi BasicBlink.rb #edit the file to match the sample code below rake make:upload --trace
Sample Code
Be sure you’ve edited BasicBlink.rb and inserted the sample code below:
#
# NOTE: The class is named Basicblink with a lowercase 'b' in the blink :)
#
class Basicblink < ArduinoSketch
# hello world (uncomment to run)
output_pin 13, :as => :led
def loop
blink led, 100
x = 4
end
end
Leave a Reply