2023-02-07 18:48阅读: 17评论: 0推荐: 0

micopython esp32

ML on esp32 with micopython
前提条件micopython固件 esp32thonny 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

image.png

本文作者:Yang-blackSun

本文链接:https://www.cnblogs.com/Yang-blackSun/p/18025354

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

本文作者:Yang-blackSun

本文链接:https://www.cnblogs.com/Yang-blackSun/p/18025354

posted @   Yang-blackSun  阅读(17)  评论(0编辑  收藏  举报  
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.
评论
收藏
关注
推荐
深色
回顶
收起