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

Discussion in 'Ruby' started by Clifford Heath, Jul 25, 2005.

  1. 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.
     
    Clifford Heath, Jul 25, 2005
    #1
    1. Advertising

  2. Clifford Heath

    Phil Tomson Guest

    In article <42e42063$0$24974$>,
    Clifford Heath <> 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
     
    Phil Tomson, Jul 25, 2005
    #2
    1. Advertising

  3. 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.
     
    Clifford Heath, Jul 25, 2005
    #3
  4. 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::/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.
     
    Clifford Heath, Jul 29, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    1
    Views:
    1,408
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    607
    SpamProof
    Oct 21, 2003
  3. OSG
    Replies:
    0
    Views:
    383
  4. Li Chen
    Replies:
    0
    Views:
    90
    Li Chen
    Sep 12, 2008
  5. John Tsiombikas

    Trivial C11 threads.h wrapper (public domain)

    John Tsiombikas, Sep 27, 2012, in forum: C Programming
    Replies:
    37
    Views:
    2,040
    Shao Miller
    Dec 15, 2012
Loading...

Share This Page