require external libraries?

1 view
Skip to first unread message

Mapop

unread,
May 5, 2008, 2:08:20 PM5/5/08
to Ruby Arduino Development
I'm new to the RAD, and I wanted to know if I'm missing something --

I've tried to do some simple external library, and add testing to that
library. I created 'lib' and 'test' and added testing to my Rakefile -
I was able to do a simple 'enable/disable' led method, and use mocks
to test against it...so far so good.

Then I tried to add this one function library to my arduino code:

require 'lib/ledsupport'

class TestSketch < ArduinoSketch
output_pin 13, :as => :pin6
def loop
toggleLED(self,pin6)
end

end

When I look at the CPP file I see that there is in conversion of the
external library files (my external library methods are referenced,
but there is no import, or corresponding CPP files).

Is it possible to use 'require' on the ruby end? If so, what is the
method for doing that?

Thanks!
Reply all
Reply to author
Forward
0 new messages