working on T-Beam 0.7 VBAT reading
This commit is contained in:
parent
43a9da194b
commit
ab1efc0a84
|
|
@ -366,7 +366,7 @@ void batt_read(){
|
||||||
BattVolts = axp.getBattVoltage()/1000;
|
BattVolts = axp.getBattVoltage()/1000;
|
||||||
InpVolts = axp.getVbusVoltage()/1000;
|
InpVolts = axp.getVbusVoltage()/1000;
|
||||||
#elif T_BEAM_V0_7
|
#elif T_BEAM_V0_7
|
||||||
BattVolts = ((float)analogRead(35) * 7.221 / 8192); // fixed thanks to Luca IU2FRL
|
BattVolts = ((float)analogRead(35) / 8192.0) * 2.0 * 3.3 * (1100.0 / 1000.0); // fixed thanks to Luca IU2FRL
|
||||||
#else
|
#else
|
||||||
BattVolts = analogRead(35)*7.221/4096; // fixed thanks to Luca IU2FRL
|
BattVolts = analogRead(35)*7.221/4096; // fixed thanks to Luca IU2FRL
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -516,6 +516,12 @@ void sendTelemetryFrame() {
|
||||||
|
|
||||||
// + SETUP --------------------------------------------------------------+//
|
// + SETUP --------------------------------------------------------------+//
|
||||||
void setup(){
|
void setup(){
|
||||||
|
//#ifdef T_BEAM_V0_7
|
||||||
|
// adcAttachPin(35);
|
||||||
|
// adcStart(35);
|
||||||
|
// analogReadResolution(10);
|
||||||
|
//#endif
|
||||||
|
|
||||||
SPI.begin(SPI_sck,SPI_miso,SPI_mosi,SPI_ss); //DO2JMG Heltec Patch
|
SPI.begin(SPI_sck,SPI_miso,SPI_mosi,SPI_ss); //DO2JMG Heltec Patch
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue