RAD is a Ruby port of the Arduino programming libraries done by fellow Portlander Greg Borenstein. You get to leverage Ruby in your sketches, and RAD will convert your Ruby code => Arduino code and even handle uploading onto your Arduino. Vernon Effalo convinced me to pick up an Arduino starter kit from Adafruit Industries a month or two ago but I haven’t really delved into Arduino until this week.
I have an Arduino Duemilanove which has an Atmega328 chip. In order to get RAD to properly talk to the Atmega328, a few configuration settings have to be changed. I found a handy guide at the Dead Programmer Society that outlines how to configure RAD for an Atmega328. My hardware.yml file is as follows:
serial_port: /dev/tty.usbserial*
physical_reset: false
mcu: atmega328p
Also, as outlined in the aforementioned guide, you have to the change the baud rate since the Duemilanove’s baud rate is higher than that of previous Arduinos. The baud rate setting is located on line 77 of the file “/vendors/rad/generators/makefile/makefile.erb”. Change it to:
UPLOAD_RATE = 57600
It’s also worth noting that I couldn’t get Arduino 16, the latest version of the Arduino software, to work properly so I am using Arduino 15 instead, which works fine.