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

Add IO9 / VBAT_SENSE to lilygo-t8-s2-st7789 #5279

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

skieast
Copy link

@skieast skieast commented Aug 31, 2021

Added IO9 / VBAT_SENSE pin to lilygo_t8_s2_st7789 board
Tested with

import board
import analogio

vbat_voltage = analogio.AnalogIn(board.VBAT_SENSE)


def get_voltage(pin):
    return (pin.value * 3.3) / 65536 * 2


while True:
    battery_voltage = get_voltage(vbat_voltage)
    print("VBat voltage: {:.2f}".format(battery_voltage))
    time.sleep(1)
````

tannewt
tannewt previously requested changes Sep 1, 2021
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! One request

ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c Outdated Show resolved Hide resolved
@anecdata
Copy link
Member

anecdata commented Sep 1, 2021

Addresses #5277

@microdev1 microdev1 linked an issue Sep 1, 2021 that may be closed by this pull request
@microdev1 microdev1 added board New board or update to a single board enhancement espressif applies to multiple Espressif chips labels Sep 1, 2021
@microdev1 microdev1 dismissed tannewt’s stale review September 1, 2021 08:23

Requested change has been addressed.

@microdev1 microdev1 merged commit 2c45f94 into adafruit:main Sep 1, 2021
@skieast skieast deleted the add-IO9-ttgo-t8-s2-st7789 branch September 1, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board New board or update to a single board enhancement espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make IO9 available on lilygo_ttgo_t8_s2_st7789
4 participants