Files
MeshCore-RelayRadio/variants/lilygo_t_impulse_plus/TImpulsePlusBoard.cpp
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

40 lines
977 B
C++

#include <Arduino.h>
#include <Wire.h>
#include "TImpulsePlusBoard.h"
void TImpulsePlusBoard::begin() {
NRF52BoardDCDC::begin();
// turn on 3.3v
pinMode(RT9080_EN, OUTPUT);
digitalWrite(RT9080_EN, HIGH);
delay(100);
// init gps pins
pinMode(GPS_EN, OUTPUT);
digitalWrite(GPS_EN, HIGH); // gps off by default
// configure battery measurement
pinMode(BATTERY_ADC_DATA, INPUT);
pinMode(BATTERY_MEASUREMENT_CONTROL, OUTPUT);
digitalWrite(BATTERY_MEASUREMENT_CONTROL, LOW); // turn off battery voltage measurement
// set the analog reference to 3.0V (default = 3.6V)
analogReference(AR_INTERNAL_3_0);
// set the resolution to 12-bit (0..4095)
analogReadResolution(12); // Can be 8, 10, 12 or 14
// configure user button
pinMode(TTP223_KEY, INPUT_PULLDOWN);
#if defined(PIN_WIRE_SDA) && defined(PIN_WIRE_SCL)
Wire.setPins(PIN_WIRE_SDA, PIN_WIRE_SCL);
#endif
Wire.begin();
delay(10); // give sx1262 some time to power up
}