micropython/ports/esp32/boards/DENEYAP_KART/modules/deneyapkart.py

35 wiersze
515 B
Python

# Deneyap Kart Helper Library
from micropython import const
from machine import Pin
# Pin Assignments
# SPI
SPI_MOSI = const(5)
SPI_MISO = const(18)
SPI_CLK = const(19)
# I2C
I2C_SDA = const(4)
I2C_SCL = const(15)
# DAC
DAC1 = const(25)
DAC2 = const(26)
# RGB LED
LEDR = const(3)
LEDG = const(1)
LEDB = const(4)
# BUTTON
GPKEY = const(0)
# Built-in peripherals
ledr = Pin(LEDR, Pin.OUT, value=0)
ledg = Pin(LEDG, Pin.OUT, value=0)
ledb = Pin(LEDB, Pin.OUT, value=0)
gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP)