Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Interest in a wrapper for the Dallas/Maxim OneWire Public DomainAPI?

Reply
Thread Tools

Interest in a wrapper for the Dallas/Maxim OneWire Public DomainAPI?

 
 
Clifford Heath
Guest
Posts: n/a
 
      07-24-2005
I'm writing some stuff to handle a couple of different IButtons
(memory, clock) using the Dallas/Maxim serial port adapter (the
new one which uses the DS2480 chip). This adapter and others are
well supported by a rather grubby C API, and I couldn't bring
myself to work in C only. So I've created a Ruby extension to
wrap it. Or at least the bits I've needed so far...

Just thought I'd put out a feeler to see if there's interest in it
from others out there. Especially if someone wants to extend or
maintain it... . I know that the one-wire interface is used by
a number of commercial and home-brew weather stations, for example,
and also in temperature monitoring. I can't add support for those
devices since I don't own either.

As far as I can tell, the API it wraps doesn't seem to allow
linking programs that can choose which driver to use at run time.
You must link it to use the USB driver *or* the serial driver .
I don't plan to fix this, so the Ruby wrapper will be only for the
serial driver that I have.

Clifford Heaty.
 
Reply With Quote
 
 
 
 
Phil Tomson
Guest
Posts: n/a
 
      07-25-2005
In article <42e42063$0$24974$(E-Mail Removed)> ,
Clifford Heath <(E-Mail Removed)> wrote:
>I'm writing some stuff to handle a couple of different IButtons
>(memory, clock) using the Dallas/Maxim serial port adapter (the
>new one which uses the DS2480 chip). This adapter and others are
>well supported by a rather grubby C API, and I couldn't bring
>myself to work in C only. So I've created a Ruby extension to
>wrap it. Or at least the bits I've needed so far...
>
>Just thought I'd put out a feeler to see if there's interest in it
>from others out there. Especially if someone wants to extend or
>maintain it... . I know that the one-wire interface is used by
>a number of commercial and home-brew weather stations, for example,
>and also in temperature monitoring. I can't add support for those
>devices since I don't own either.
>
>As far as I can tell, the API it wraps doesn't seem to allow
>linking programs that can choose which driver to use at run time.
>You must link it to use the USB driver *or* the serial driver .
>I don't plan to fix this, so the Ruby wrapper will be only for the
>serial driver that I have.
>


Sounds cool! I don't have time to play with it right now, but definitely
will look at it in the future (would something like this be usable for
monitoring aquarium parameters?). Please go to RubyForge.org and request
a new project there and at least upload the code.

Phil

 
Reply With Quote
 
 
 
 
Clifford Heath
Guest
Posts: n/a
 
      07-25-2005
Phil Tomson wrote:
> Sounds cool! I don't have time to play with it right now, but definitely
> will look at it in the future (would something like this be usable for
> monitoring aquarium parameters?).


Will do. The IButton thermometers are excellent for this purpose, all
you need is a serial port adapter (DS1411-S09, $31.50 from Maxim) and
two wires. You can string a bunch of IButtons across the single pair
of wires, and the port will provide power, enumerate the different
buttons, and allow you to talk to them individually. You'd use DS1920
for temperature, $6.76 from Maxim. I'm sure these are available from
Digikey as well but the catalog search isn't finding them at present.

The buttons themselves are very robust. I heard of one of the
temperature-logging buttons being immersed in a mountain stream for an
entire year, recording the temperature hourly for an annual profile.
They're also very secure - they are the "key" used to unlock ATM
machines (NCR ones, anyway, don't know about others).

> Please go to RubyForge.org and request
> a new project there and at least upload the code.


Will do. I'm going to finish the clock support first though, and I
need to be able to wait for IButton insertion.

Clifford Heath.
 
Reply With Quote
 
Clifford Heath
Guest
Posts: n/a
 
      07-29-2005
Rubyforge now has a "onewire" project with source in CVS that will
build on Linux (including Debian packages) and Windows. The Windows
version isn't tested yet.

The API has methods to enumerate IButtons, read and write memory
buttons, and control those with a real-time clock.

I'll upload precompiled packages when I've finished testing, but
I wanted to know if anyone else has the DS2480-based serial port
adapter, and is willing to help test the software. If you do, it's
a simple matter of (Linux shell or cygwin):

export CVSROOT=:ext:(E-Mail Removed):/var/cvs/onewire
export CVS_RSH=ssh
cvs co src
cd src/owpd300
make
cd ..
ruby extconf.rb
make

and you're done in under a minute. Substitute "dpkg-buildpackage"
for the last make and you'll get Debian packages.

Let me know whether you succeed or have problems.

Clifford Heath.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSE 4 11-15-2006 02:40 AM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola Microsoft Certification 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSD 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd realexxams@yahoo.com Microsoft Certification 0 05-10-2006 02:35 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM



Advertisments