Subject:
Re: [ruby-ffi] success using ffi to read Vernier sensor data from ruby and jruby
From:
Stephen Bannasch
Date:
12/14/09 9:22 AM
To:
ruby-ffi@googlegroups.com

> > The initial implementation of a Ruby FFI interface to a Vernier GoIO sensor now works!
>>
>>    http://gist.github.com/254981
>>
>> It's an adaptation of the GoIO_DeviceCheck.cpp sample app supplied with the Vernier GoIO SDK.
>>
>>    http://www.vernier.com/downloads/gosdk.html
>>
>> Vernier makes all kinds of inexpensive sensors and interfaces:
>>
>>    http://www.vernier.com/go/
>>
>> [...SNIP..]
>>
>> While the initial implementation is ugly (and doesn't do much) I think it's quite amazing that I can use one dynamic library
>> from Vernier and the same FFI code in Ruby and JRuby!
>>
>> Vernier supplies the full source code for their SDK as public domain. They have dynamic libraries for Mac OS X and Windows (not
>> sure how hard it would be to also compile one for Linux).  I don't have a Windows system here but if Nokogiri can workon
>> Windows I'll bet this can also.
>
>That looks really cool and along the same lines I've been itching to start playing with an FFI version of Alan's http://tenderlovemaking.com/2009/09/19/ruby-and-rfid-tags/  Alas, where does the time go :(
>
>If you decide to pull your info together into a blog post, would you mind starting a Tutorial's wiki page at http://wiki.github.com/ffi/ffi and put a link to your blog entry, something similar in style to http://wiki.github.com/oneclick/rubyinstaller/tutorials

Sure.

I'm turning the initial implementation into a gem -- and when I get the basic functionality working I'll be happy to post and add to the wiki.