I am very new to CircuitPython and would like to customize the screen for a ESP32-S2 Rev. TFT. I have added the SCD-30 CO2 Sensor and with the following code have been able to pull basic readings from the sensor. I would now like to change font sizes and font colors to arrange display in a more readable format. Looking for examples that I could follow to further tweak to my satisfaction. Here is what I have so far:
# SPDX-FileCopyrightText: 2020 by Bryan Siepert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
import time
import board
import busio
import adafruit_scd30
import displayio
# SCD-30 has tempremental I2C with clock stretching, datasheet recommends
# starting at 50KHz
i2c = busio.I2C(board.SCL, board.SDA, frequency=50000)
scd = adafruit_scd30.SCD30(i2c)
while True:
# since the measurement interval is long (2+ seconds) we check for new data before reading
# the values, to ensure current readings.
if scd.data_available:
print("Data Available!")
print("CO2: %d PPM" % scd.CO2)
print("Temperature: %0.2f degrees F" % ((scd.temperature * 9/5) + 32 - 6))
print("Humidity: %0.2f %% rH" % scd.relative_humidity)
print("")
print("Waiting for new data...")
print("")
time.sleep(10)
Feather Displayio Basic Questions
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Feather Displayio Basic Questions
There are some useful guides to get started with:
https://learn.adafruit.com/circuitpytho ... -displayio
https://learn.adafruit.com/making-a-pyp ... -displayio
https://learn.adafruit.com/pyportal-cal ... i-elements
https://learn.adafruit.com/using-circui ... eatherwing
https://learn.adafruit.com/magtag-weather
https://learn.adafruit.com/circuitpytho ... -displayio
https://learn.adafruit.com/making-a-pyp ... -displayio
https://learn.adafruit.com/pyportal-cal ... i-elements
https://learn.adafruit.com/using-circui ... eatherwing
https://learn.adafruit.com/magtag-weather
- rfuse
- Posts: 2
- Joined: Sun May 21, 2023 8:22 am
Re: Feather Displayio Basic Questions
Thanks I will look into these links.
Please be positive and constructive with your questions and comments.