-
Notifications
You must be signed in to change notification settings - Fork 329
Add sensor support to Heltec t114 #1208
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
base: dev
Are you sure you want to change the base?
Conversation
|
Tested on t114 with GPS too - it's working. |
|
Are you able to add sensor support to Heltec T114 with display? Whenever, Wire1 is active, Wire instance seems clear / resets and can not be used. |
My change adds EnvironmentSensorManager as a sensor manager class. It will only activate Wire1 and scan for sensors on boards without display because those boards are often used as repeaters. Repeaters often use sensors (current, temperature, humidity etc) and I was surprised that t114 implementation did not support any. Regarding V3: if I remember correctly, it already has sensor support. Pins 17 and 18 are tiny and located in the middle of the board. Has something changed in this regard? |
Added NRF52Board.h and NRF52Board.cpp Modified NRF52 variants to extend from NRF52Board to share common feature
|
Ok, thanks a lot for sharing. I use GPIO41 and 42 for Wire1 instead of the tiny GPIO17 and 18. |
Signed-off-by: Frieder Schrempf <[email protected]>
The reboot() method is the same for all NRF52 boards. Use a shared implementation. Signed-off-by: Frieder Schrempf <[email protected]>
Use a common begin() method that can be called from derived classes to contain the shared initialization code. Signed-off-by: Frieder Schrempf <[email protected]>
Some NRF52 boards are able to use the internal power-efficient DC/DC regulator. Add a new class that can be inherited by board classes to enable this feature and reduce the power consumption. Signed-off-by: Frieder Schrempf <[email protected]>
The startOTAUpdate() is the same for all NRF52 boards. Use a common implementation for all boards that currently have a specific implementation. The following boards currently have an empty startOTAUpdate() for whatever reasons and therefore are not inheriting NRF52BoardOTA to keep the same state: Nano G2 Ultra, Seeed SenseCAP T1000-E, Wio WM1110. Signed-off-by: Frieder Schrempf <[email protected]>
The function in the derived class is virtual per definition. Mark it to make this clearer to the reader. Signed-off-by: Frieder Schrempf <[email protected]>
The RAK4631/RAK4630 module are able to use the DC/DC converter. Enable it to reduce power consumption. Signed-off-by: Frieder Schrempf <[email protected]>
|
Rebased, all good. |
This PR adds a second I2C interface (Wire1) and uses EnvironmentSensorManager in t114 variant. This automatically adds support for all the sensors that EnvironmentSensorManager supports.
The Wire1 (and thus sensors) is currently enabled only for Heltec_t114_repeater and Heltec_t114_without_display_repeater targets.
Tested with t114 repeater (no screen, no gps). All the t114 build targets are building ok.