Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the voltage of the battery of the TTGO T-Beam on the screen #5

Closed
F4EWI opened this issue Nov 5, 2020 · 4 comments
Closed

Comments

@F4EWI
Copy link

F4EWI commented Nov 5, 2020

The idea would be to display the TTGO battery voltage and to have the possibility to send this value in the message APRS -> BEACON_MESSAGE.
It is better to have a voltage displayed rather than an icon which does not give an exact value -> more "professional" as for radiosonde.

@peterus
Copy link
Member

peterus commented Nov 5, 2020

thanks for the ticket, unfortunately I did not had time today, but i will fix it in the next days!
I was thinking of sending the battery voltage as a telemetry data, so aprs.fi can generate graphs etc. what do you think?

@raufaser
Copy link

raufaser commented Nov 5, 2020

Please have a look at my pull request. Battery voltage and (dis)charge current are are displayed.
Telemetry is still to-do.

@F4EWI
Copy link
Author

F4EWI commented Nov 6, 2020

Good idea for the telemetry ...
Piece of code I found in another project on github :

#define BATTERY_PIN 35 // battery level measurement pin, here is the voltage divider connected
void getBatteryVoltage()
{
// we've set 10-bit ADC resolution 2^10=1024 and voltage divider makes it half of maximum readable value (which is 3.3V)
vBat = analogRead(BATTERY_PIN) * 2.0 * (3.3 / 1024.0);
Serial.print("Battery voltage: ");
Serial.print(vBat);
Serial.println("V");
}

@peterus
Copy link
Member

peterus commented Nov 6, 2020

Thanks for the Pull Request, I merged it into mainline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants