Simple test

Ensure your device works with this simple test.

examples/simple_text_display_simpletest.py
 1# SPDX-FileCopyrightText: Copyright (c) 2021 Kattni Rembor for Adafruit Industries
 2#
 3# SPDX-License-Identifier: Unlicense
 4"""Display the microcontroller CPU temperature in C and F on a display."""
 5
 6import microcontroller
 7
 8from adafruit_simple_text_display import SimpleTextDisplay
 9
10temperature_data = SimpleTextDisplay(title="Temperature Data!", title_scale=2)
11
12while True:
13    temperature_data[0].text = f"Temperature: {microcontroller.cpu.temperature:.2f} degrees C"
14    temperature_data[
15        1
16    ].text = f"Temperature: {microcontroller.cpu.temperature * (9 / 5) + 32:.2f} degrees F"
17    temperature_data.show()