mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
fixed build errors and typos/inconsistencies
This commit is contained in:
parent
465776d667
commit
3a7ccc085d
5 changed files with 56 additions and 41 deletions
|
|
@ -1,14 +1,28 @@
|
|||
#include <Arduino.h>
|
||||
#include "ThinknodeM3Board.h"
|
||||
#include "ThinkNodeM3Board.h"
|
||||
#include <Wire.h>
|
||||
|
||||
#include <bluefruit.h>
|
||||
|
||||
void ThinknodeM3Board::begin() {
|
||||
Nrf52BoardDCDC::begin();
|
||||
void ThinkNodeM3Board::begin() {
|
||||
NRF52Board::begin();
|
||||
btn_prev_state = HIGH;
|
||||
|
||||
Wire.begin();
|
||||
|
||||
delay(10); // give sx1262 some time to power up
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t ThinkNodeM3Board::getBattMilliVolts() {
|
||||
int adcvalue = 0;
|
||||
|
||||
analogReference(AR_INTERNAL_2_4);
|
||||
analogReadResolution(ADC_RESOLUTION);
|
||||
delay(10);
|
||||
|
||||
// ADC range is 0..2400mV and resolution is 12-bit (0..4095)
|
||||
adcvalue = analogRead(PIN_VBAT_READ);
|
||||
// Convert the raw value to compensated mv, taking the resistor-
|
||||
// divider into account (providing the actual LIPO voltage)
|
||||
return (uint16_t)((float)adcvalue * ADC_FACTOR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue