Maker badge

CircuitPython 8.1 (2023-05)

Knihovny

import time
import terminalio
import board
import neopixel
import touchio
import displayio
import adafruit_ssd1680
from adafruit_display_text import label
from digitalio import DigitalInOut, Direction, Pull

Definice

# Define board pinout
board_spi = board.SPI()  # Uses SCK and MOSI
board_epd_cs = board.D41
board_epd_dc = board.D40
board_epd_reset = board.D39
board_epd_busy = board.D42
enable_display = DigitalInOut(board.D16)
enable_display.direction = Direction.OUTPUT

# Define LED
led_pin = board.D18
led_matrix = neopixel.NeoPixel(led_pin, 4, brightness = 0.1, auto_write = False)

# Define LED colors value
led_off = (0, 0, 0)
led_red = (255, 0, 0)
led_green = (0, 255, 0)
led_blue = (0, 0, 255)

# Define ePaper display colors value
display_black = 0x000000
display_white = 0xFFFFFF

# Define ePaper display resolution
display_width = 250
display_height = 122

Funkce

TOP