增加训练yolo的代码

This commit is contained in:
gcw_4spBpAfv
2026-05-15 09:35:53 +08:00
parent dff5096164
commit 541418fd60
13 changed files with 953 additions and 140 deletions

25
test/test_button.py Normal file
View File

@@ -0,0 +1,25 @@
from maix import audio, time, app,gpio
# button1 = gpio.GPIO("ADC", gpio.Mode.IN)
button3 = gpio.GPIO("A26", gpio.Mode.IN) # 可用
button2 = gpio.GPIO("A16", gpio.Mode.IN)
#设置低电平
from maix.peripheral import adc
channel = 0
res_bit = adc.RES_BIT_12
_adc_obj = adc.ADC(channel, res_bit)
while not app.need_exit():
# print(f"b1: {button1.value()}")
print(f"b2: {button2.value()}")
# print(_adc_obj.read_vol())
print(f"b3: {button3.value()}")
time.sleep_ms(50)
# time.sleep_ms(1000)