1414from machine import ADC , I2C , Pin , SPI , SDCard
1515import lcd_bus
1616import i2c
17+ import time
1718
1819import lvgl as lv
1920
@@ -107,7 +108,6 @@ def get_voltage(force_refresh=False, raw_adc_value=None):
107108 e = InputManager .list_indevs ()[2 ]
108109 e .enable (False )
109110 # Wait to ensure more than 5ms between input polls
110- import time
111111 time .sleep_ms (10 )
112112 # Do the read:
113113 returnval = (0.001857993861607339 * mpos .io_expander .analog ()[2 ] - 0.9965856090206169 )
@@ -125,7 +125,6 @@ def get_voltage(force_refresh=False, raw_adc_value=None):
125125# LCD reset using the CH32 microcontroller
126126time .sleep_ms (10 ) # make sure writes are spaced out to workaround Fri3dCamp/badge_2026_fw/issues/2
127127expander .config = 0x01 # 3v3 aux on + LCD off
128- import time
129128time .sleep_ms (100 )
130129expander .config = 0x03 # 3v3 aux + LCD on
131130
@@ -161,7 +160,6 @@ def get_voltage(force_refresh=False, raw_adc_value=None):
161160mpos .ui .main_display .set_rotation (lv .DISPLAY_ROTATION ._270 )
162161
163162# Button handling code:
164- import time
165163btn_start = Pin (0 , Pin .IN , Pin .PULL_UP ) # START
166164
167165# Key repeat configuration
@@ -323,7 +321,6 @@ def keypad_read_cb(indev, data):
323321SensorManager .init (i2c_bus , address = 0x6A , mounted_position = SensorManager .FACING_EARTH ) # IMU (LSM6DSOTR-C / LSM6DSO)
324322
325323# === STARTUP "WOW" EFFECT ===
326- import time
327324import _thread
328325
329326def startup_wow_effect ():
0 commit comments