-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples Will Now Compile For Arduino R4 And Communicate (With Some Modifications) #145
Comments
I'm sorry; I threw in the allowance to use the library down to 48MHz without any testing. The only boards I tested using the micros() math were faster ESP8266 and ESP32 modules. 2: The 3: The library does not use the
Some things you can try to get it to work:
|
SDI-12 And The Arduino R4 8/26/24 Thank you for the helpful suggestions. In order of what we have tried here, our results follow: • Try creative wiring to split the SDI-12 data line to connect to 3 wires: the Tx and Rx of a hardware serial port (ie, Serial1) and a pin to set the low and high levels for the break and the marking. You'd have to write the timing out for the break and marking, but hardware serial on your core probably supports 7E1 and 1200 baud. I've never tried this method. -The version 1.0 code also compiled for the R4, as there were no conditions that would not allow it. There were no AVR specific lines we had to remove. At first, we were unable to get the R4 to communicate with our EnviroPro moisture probe. We then hooked up an Oscope to the data line, broke out the SDI-12 spec sheet, and were able to see the Break and Mark signals, along with the data pulses coming from the Arduino. The sensor was not responding with any data. The Arduino R3 we had as a control was able to communicate (Serial console showed responses, as well as Oscope pulses). In both cases, the Mark and Break signals were within the specifications. This was encouraging, and lead us to try the first suggestion: |
Thank you for the work last week with micros() on trying to get the Renesas platform 48 MHz Arduino R4 boards to run the SDI-12 library. When we updated the SDI12 library, the examples would compile for an Arduino R4, but we could not get it to send or receive data to/from an EnviroPro EP100G moisture probe. The earlier R3 Arduinos will communicate ok.
I do not know what the cause is, but here are some observations we made:
1: The resolution of micros does not appear to be 1 microsecond for the 48 MHz R4.
2: The "TICKS_PER_BIT 833UL" line looks different from the other ticks per bit lines that have just a number after "BIT ".
3: Around line 205 in SDI12_boards.h, for the case "F_CPU >= 48000000L", that does not have "PRESCALE_IN_USE_STR" with some kind of string after it.
I hope the above are helpful. We would really like to upgrade the R3 UNOs to R4s and have more functionality. I can imagine it would not be possible to test if the library works with an UNO R4 without having one on hand. Can I help by testing out some code ideas with the R4 boards we have here and carefully describing any errors we get? I regret I do not have the knowledge to adapt the library myself, but would be glad to assist you.
The text was updated successfully, but these errors were encountered: