sdi-12 library #912
Replies: 1 comment
-
We do not include libraries for anything other than the couple of most common use cases (Wire, SPI, the new hardware peripherals (as these have a lot of part-specific stuff in them) and the Servo, SD, and tinyNeoPixel libraries, all because there are reasons the normal libraries don't work. The stock megaAVR Servo library blows up on anything not a mega 0-series because it explicitly only supports those. Same deal for SD. And AFAIK neither adafruit nor fastLED has added support. There is one very annoying thing about modern AVRs and pin interrupts on Arduino - if you use attach interrupt anywhere in a sketch you cannot have manually defined ones. On classic AVRs, there were only 1-4 full service interrupt pins on a part. Now all parts are a combination of PCINTs and normal interrupts -except for waking from sleep - they can trigger on rising and falling, low level and change, but figuring out which one on a port was triggered when multiple are setup takes logic in the intflags. But unlike classic avr where attachInterrupt only gloms onto the INTn vectors leaving the PCINTs available for user code, if attach interrupt is used ANYWHERE except via manual mode (see the interrupt reference), it gloms on to EVERY port vector, and manually defined interrupts are not possible. Which kinda matters with around 100 cycles of overhead most of it not necessary |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! The library for the SDI-12 enviromental protocol https://github.com/EnviroDIY/Arduino-SDI-12 has support for various boards (classic AVR, SAMD, Espressif), but it does not offer support for MegaAVR and modern ATtiny microcontrollers.
The ATtiny1614 is incompatible in the definition of the interrupt routine (it uses PCMSK and PCICR registers of the ATmega328) and also in the timer setup (Timer1)
I have been using it for some time with the ATmega328 with an internal oscillator at 2 MHz, but currently, I only have the ATtiny1614 chip available. I will be very grateful if include the SDI12 library for the latest release v2.1.4.
Beta Was this translation helpful? Give feedback.
All reactions