Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (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 (wio-e5-mini_repeater) (push) Has been cancelled
- MeshCore-based Simple Sensor firmware - Heltec T114 without display - BME280 sensor support (temp/humidity/pressure) - Radio: 868.856018 MHz, SF7, BW62.5 kHz, CR4/7 - 2-byte path hash - PlatformIO project
51 lines
1.0 KiB
C++
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
|
|
|