working on T-Beam 0.7 VBAT reading
rodzic
43a9da194b
commit
ab1efc0a84
|
@ -366,7 +366,7 @@ void batt_read(){
|
|||
BattVolts = axp.getBattVoltage()/1000;
|
||||
InpVolts = axp.getVbusVoltage()/1000;
|
||||
#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
|
||||
BattVolts = analogRead(35)*7.221/4096; // fixed thanks to Luca IU2FRL
|
||||
#endif
|
||||
|
@ -516,6 +516,12 @@ void sendTelemetryFrame() {
|
|||
|
||||
// + 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
|
||||
Serial.begin(115200);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue