Comments (11)
Hi @jrzondagh - Great to hear from you!
I see your sensor-side SDI-12 repository and would be interested in contributing to it.
I think that this repository should only implement SDI-12 data logging functionality and keep all the sensor-side functionality in your repository.
Eventually we could change the name of this repository to help users distinguish between the two.
What do you think?
from arduino-sdi-12.
Yeah sure, I figured that we can quite easily add the slave logic into your lib. You can see it in the fork I created.
I see the current lib being "Layer 2" and then the sketches I'm busy with as Layer 3/4/5 which interprets the protocol itself.
Essentially I just did the following to your lib:
- added global var and isSlave input into constructor
- instead of HOLDING in begin() we also go to LISTENING if a slave
- if isSlave, don't wake sensors in the sendCommand()
Still busy testing, will keep you posted and perhaps we can merge back and keep it backwards compatible.
from arduino-sdi-12.
I wish I had seen this conversation months ago! I have been working on the same thing independently. My solution was slightly different. It is backward compatible as I did not modify anything, only added two functions:
- Do not modify the constructor.
- Add public void forceListen() function to address your second bullet (it should be called in the setup() of the sketch). Note: The more straightforward way is to make setState() public, but I was trying to avoid modifying existing functions.
- Add public void sendResponse() function to address your third bullet. Note: in addition to not calling wakeSensors() for a response, you must also call setState(TRANSMITTING) and, per SDI-12 spec, precede the response with an 8.33 ms LOW.
I've also created a generalized example sketch of how to implement an SDI-12 slave device. The modified lib and the example are publicly available in my fork off of this repository.
from arduino-sdi-12.
Great news. I actually ended up doing a big refactor of the lib to no longer use interrupts. Going to fork it and share back soon
from arduino-sdi-12.
Exciting stuff! Can't wait to see it. Doing it without interrupts may mean we can support ARM processors (e.g. Arduino Due).
On Aug 9, 2016, at 11:25 AM, Justin Zondagh [email protected] wrote:
Great news. I actually ended up doing a big refactor of the lib to no longer use interrupts. Going to fork it and share back soon
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
from arduino-sdi-12.
Wow! That sounds like a massive change; I'm curious to see how you implemented it. I suppose that would also resolve the SoftwareSerial incompatibility issue.
from arduino-sdi-12.
Yeah. I'm using it on an Atmel SAMD21 / ARM Cortex M0 chip with great success. Will share in the next week or so.
from arduino-sdi-12.
Hey @jrzondagh, how is this coming along? Any outstanding tasks we might be able to help with?
from arduino-sdi-12.
Coincidentally this has come at the perfect time for an arduino Zero project. I'm following and able to do a bunch of testing on M0 with a bunch of SDI-12 sensors if you need any of this done
from arduino-sdi-12.
@jrzondagh Hi Justin, how is this coming along? Is there anything I could help with?
from arduino-sdi-12.
I'm going to close this issue because the slave-side (d25b299) and M0 support (#33) have both been added.
The library is still interrupt based, and @jrzondagh if you have a solution for that I would LOVE to see it, but I'll leave that discussion to continue on #8 which is all about that.
from arduino-sdi-12.
Related Issues (20)
- Question. HOT 2
- new tinyAVR boards support. tips?
- ESPhome HOT 4
- Missing check for 8.33mS marking before checking address for sdi12 slave/sensor HOT 1
- Able to adjust Break and Marking timing from Arduino code
- Support for Arduino R4 Renesas chip? HOT 1
- Doesn't work on Arduino GIGA R1
- i am using hydros21 sensor which is working on sdi12 protocol and currently i am stuck in a issue which is sensor is not working properly and not given data correctly so any one help me for this HOT 2
- ESP32- Core panic when using in conjunction with the "preferences" library. HOT 1
- NRF52 Support HOT 1
- IDE 2.0 compilation problem HOT 1
- Sparkfun Artemis and CS320 pyranometer HOT 16
- SDI12 - ESP32 NOT OPEN BUS HOT 9
- Watchdog Problem SAMD21 HOT 4
- Adding a Direction Control Pin HOT 11
- ASR6501 - Cubecell support HOT 2
- Can not read measurements HOT 8
- Do you have any plans to support rp2040 platform ? HOT 1
- Documentation missing? HOT 3
- SDI12 with SoftwareSerial (Stopgap Fix not working) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-sdi-12.