Feather Displayio Basic Questions

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rfuse
 
Posts: 2
Joined: Sun May 21, 2023 8:22 am

Feather Displayio Basic Questions

Post by rfuse »

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)


User avatar
rfuse
 
Posts: 2
Joined: Sun May 21, 2023 8:22 am

Re: Feather Displayio Basic Questions

Post by rfuse »

Thanks I will look into these links.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”