micopython esp32
ML on esp32 with micopython
前提条件micopython固件 esp32 、thonny IDE
import utime
from machine import Timer, Pin, I2C
from drivers.mpu6500 import MPU6500, SF_DEG_S, SF_M_S2
# MPU6500 module was adjusted from:
# https://github.com/tuupola/micropython-mpu9250
# set up I2C serial communication protcol
i2c = I2C(scl=Pin(22), sda=Pin(21))
# create MPU6500 instance
mpu6500 = MPU6500(i2c, accel_sf=SF_M_S2, gyro_sf=SF_DEG_S)
# read sensor function
def read_sensor(timer):
print(utime.ticks_ms(), mpu6500.acceleration, mpu6500.gyro)
# hardware timer setup
timer = Timer(0)
timer.init(period=10, mode=Timer.PERIODIC, callback=read_sensor)
用vscode 收集数据
https://labelstud.io/guide/index.html#Quick-start
conda env list
# 创建虚拟环境
conda create -n LabelStudio python=3.8
# 激活虚拟环境 conda activate LabelStudio
label-studio start
# 退出虚拟环境 deactivate


浙公网安备 33010602011771号