Files
MeshCore-RelayRadio/variants/wio_wm1110/WioWM1110Board.h
ua1zbe cdd9d32fb5
Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (push) Has been cancelled
Run Unit Tests / test (push) Has been cancelled
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (Heltec_v3_repeater) (push) Has been cancelled
PR Build Check / build (Heltec_v3_room_server) (push) Has been cancelled
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Has been cancelled
PR Build Check / build (PicoW_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (RAK_4631_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_room_server) (push) Has been cancelled
PR Build Check / build (Tbeam_SX1276_repeater) (push) Has been cancelled
PR Build Check / build (wio-e5-mini_repeater) (push) Has been cancelled
PR Build Check / build (wio_wm1110_repeater) (push) Has been cancelled
Add MeshCore relay_radio firmware for Heltec T114
2026-06-09 15:36:22 +03:00

51 lines
1.0 KiB
C++

#pragma once
#include <MeshCore.h>
#include <Arduino.h>
#include <helpers/NRF52Board.h>
#ifdef WIO_WM1110
#ifdef Serial
#undef Serial
#endif
#define Serial Serial1
class WioWM1110Board : public NRF52BoardDCDC {
public:
WioWM1110Board() : NRF52Board("WM1110_OTA") {}
void begin();
#if defined(LED_GREEN)
void onBeforeTransmit() override {
digitalWrite(LED_RED, HIGH);
}
void onAfterTransmit() override {
digitalWrite(LED_RED, LOW);
}
#endif
uint16_t getBattMilliVolts() override {
int adcvalue = 0;
analogReadResolution(12);
analogReference(AR_INTERNAL_3_0);
delay(10);
adcvalue = analogRead(BATTERY_PIN);
return (adcvalue * ADC_MULTIPLIER * AREF_VOLTAGE * 1000.0) / 4096.0;
}
const char* getManufacturerName() const override {
return "Seeed Wio WM1110";
}
void enableSensorPower(bool enable) {
digitalWrite(SENSOR_POWER_PIN, enable ? HIGH : LOW);
if (enable) {
delay(100);
}
}
};
#endif