Added RAK12035 Soil Moisture and Temperature Sensor#2223
Added RAK12035 Soil Moisture and Temperature Sensor#2223liamcottle merged 18 commits intomeshcore-dev:devfrom
Conversation
|
Changed PR #2191 to use dev as the base. Removed platformIO.ini and added It still compiles correctly for the RAK4631 versions but, is it still getting errors from the Heltec_v3 due to the mismatched pin numbering. Since it is not possible to connect a RAK12035 to a Heltec (they do not have the connector), it will never be detected, and this code will not be utilized. I can conditionalize it, but I'm not that familiar with the Heltec V3. I found the pin they use to control their 3v3 supply. All RAK boards use IO2 to control 3v3_S, but the EnvironmentSensorManager rakGPSInit() is incorrectly is using IO4 and IO5. These are actually the *reset signal for the RAK12500 GNSS GPS Location unit. The RAK12035 uses the IO4 as its *reset input. #if defined(ARDUINO_RAK4631) || defined(PLATFORM_RAK_WISBLOCK) #elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V3) || defined(HELTEC_V3) #else OR should I conditionalize each use of the WB_IO2, WB_IO4 with OR I can comment all of them out, the purpose of this code is to turn off the 3v3_S when the sensor is put to sleep and to turn the power back on when it is woken up. |
|
This now compiles correctly for Heltec v3 versions. I commented out all the uses of pinMode() and digitalWrite() and included comments on what the intended functionality was for. This was intended for when a future sensor power management is implemented. None of the routines affected were utilized, so this did not affect the functionality. The unutilized routines were added to provide the following functionality:
These can be uncommented and potentially used with future sensor power management firmware. At that time, it will require modifications to utilize the pinMode() and digitalWrite() functions with a Heltec v3. The errors will return when the comments are removed. |
|
Should I close PR #2191 |
.github/workflows/github-pages.yml
Outdated
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| cname: docs.meshcore.nz | ||
| cname: docs.meshcore.io |
There was a problem hiding this comment.
This has already been update in the main branch
There was a problem hiding this comment.
Do I need to remove this? I did not make this change. I believe it appeared when I moved to the dev branch from main. How do I fix this?
There was a problem hiding this comment.
These changes are probably being pulled in because @KPrivitt made their changes against the main branch in their local environment, and then changed the base branch to dev in the GitHub UI.
Ideally, users should check out the dev branch locally, and make changes against that.
You should be able to fix this PR by performing a rebase of your local 2026/RAK12035 branch against the dev branch and then force push it.
The reason the extra commits show up, is because your local branch is based on main which has these new commits that don't yet exist in the dev branch.
It's not really a big deal, and we could merge as is, it would just create duplicate commits, but it's cleaner for the history if you rebase the branch.
Yes. This PR looks fine. Ready to merge once that unneeded yaml change is reverted. |
|
#2191 has been closed. This is my first PR, how do I revert this? |
There was a problem hiding this comment.
I believe the rebase worked. It appears that it is no longer included but it is now shown as a comment. Let me know if I still need to do something.
PS C:\Users\kenpr\Documents\MeshCore\MeshCore-dev> git rebase --continue
[detached HEAD e7b9401] RAK12035: Rebase to resolve YAML changes
1 file changed, 33 insertions(+), 2 deletions(-)
dropping 0423729 Remomve redefinition of MESH_DEBUG_PRINT/LN -- patch contents already upstream
Successfully rebased and updated refs/heads/2026/RAK12035.
PS C:\Users\kenpr\Documents\MeshCore\MeshCore-dev> git push --force-with-lease
Everything up-to-date
|
There are now only the five that were updated or changed, and it is now pointing to meshcore-dev:dev This was a disaster, the rebase failed and I had to basically start over. All the changes I had Please recheck, I verified that it compiles for the RAk4631 and Heltec v3 |
|
Thanks for the rebase, tests appear to be passing now that the include flag has moved to the RAK variant. The commit log is now 18 commits long, so I'll squash these during merge so there's only 1 commit in the project history. Thanks for contributing! |


A RAK12035 Soil Moisture Sensor will be automatically detected and incorporated into the Telemetry and can be accessed via the Telemetry screen in a repeater or a companion. The sensor data is displayed on Channel 2.
This code also supports Calibration of a sensor via a custom version of the firmware. See the RAK12035_SoilMoisture.cpp for instructions on the calibration procedure, which uses Channel 3. Calibration must be done to a sensor; each sensor will generate different capacitance output values. Calibration will ensure the reported Moisture will return a value between 0 and 100%.
The RAK12035 Soil Moisture Sensor connects to a RAK12023 which provide three connectors for sensors. This driver only supports one sensor attached with a default I2C address of 0x20. Support can be added for additional sensors via the Set Sensor Address command (which is incorporated). The sensors attached must all have a different I2C address (this can be done by changing an additional sensors I2C address to 0x21 or 0x22) and this code will need to include the initialization of each of these sensors (but this is not included).