-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_esp32s2.py
More file actions
50 lines (40 loc) · 973 Bytes
/
settings_esp32s2.py
File metadata and controls
50 lines (40 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from machine import Pin
from micropython import const
import neopixel
cpu_freq = const(240000000)
messages = const(50)
conditions = const(50)
tasks = const(50)
display_cs = Pin(13, Pin.OUT, value = 1)
display_dc = Pin(34, Pin.OUT)
display_rst = Pin(35, Pin.OUT)
display_sck = Pin(10)
display_mosi = Pin(11)
display_spi = const(1)
display_baudrate = const(80_000_000)
keyboard_scl = Pin(15)
keyboard_sda = Pin(14)
keyboard_i2c = const(1)
keyboard_baudrate = const(100000)
sd_cs = Pin(37)
sd_sck = Pin(38)
sd_mosi = Pin(39)
sd_miso = Pin(36)
sd_spi = const(2)
sd_baudrate = const(80_000_000)
pwm_left = Pin(6)
pwm_right = Pin(7)
rtc_scl = Pin(41)
rtc_sda = Pin(8)
rtc_freq = 4000
ntp_delta = const(3155673600 + 3600 * 7)
class led(object):
np = neopixel.NeoPixel(Pin(9), 1)
@classmethod
def on(cls):
cls.np[0] = (0, 1, 0)
cls.np.write()
@classmethod
def off(cls):
cls.np[0] = (0, 0, 0)
cls.np.write()