Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

SDI-12 library support

Home Forums Environmental Sensors SDI-12 library support

This topic contains 3 replies, has 3 voices, and was last updated by  Sara Damiano 2 weeks, 1 day ago.

  • Author
    Posts
  • #12660

    fbriggs
    Participant

    I am using the SDI-12 Arduino library which was created by this group and can be found here for reference. I got it working with an Arduino UNO without any issues. However, I need to use it with an Arduino Teensy which it does not currently support. I am curious if anyone has integrated a Teensy with it it before? If not is anyone interested in working with me to help support it in the library? Thanks!

  • #12661

    Sara Damiano
    Participant

    I’m not familiar with the Teensy at all, but based on my <5 minutes of google research:

    – They’re ARM Cortex-M4 boards – totally different processor style
    – But the core libraries support the same attachInterrupt() routine that I use to support interrupts on the SAMD boards – good – you can just copy the SAMD interrupt includes
    – google isn’t telling me how timers work on the teensy – bad – In order to do a better job of reading the (slow) sdi-12 communication without wasting a huge (relative to processor speed) amount of time delaying in the the interrupt routines, I’ve re-written the library to check what time bits changed based on the processor timers. To get it to work on the teensy, you’d need to figure out how the timers work on the teensy and then write out the correct timer-checking information into the sdi12_boards file

    Unless you have a 2.0, then it’s basically a Leonardo and should work fine.

    Unfortunately, I don’t have any time at all to help you with this. I might be able to glance at pull requests or give you quick guidance on how the timers are integrated, but I can’t do much more than that.

  • #12662

    neilh
    Participant

    hi @frbiggs I’ve used the teensy – but it comes in a number of flavors.
    Checkout https://github.com/duff2013/SDI12_T3
    IHMO the Teensy3.5 also has +5V tolerant pins.
    The Teensy3.5 and 3.6 processors have some nice ram. https://blog.adafruit.com/2016/10/06/new-products-teensy-3-5-teensy-3-6/

    Can you say what your context is – are you looking to use ModularSensors which also has a lot of infrastructure support.

  • #12663

    Sara Damiano
    Participant

    ModularSensors doesn’t support the teensy at all and it’s very unlikely that I’ll ever be able write in the support for it there. Your have to switch to an AVR or SAMD based board to use it.

You must be logged in to reply to this topic.