2023-7-8 02:02:54 [显示全部楼层]
569浏览
查看: 569|回复: 1

[Micropython] micropython ESP32 DS18B20 onewire报错

[复制链接]
运行代码
from machine import Pin
import onewire
import ds18x20
import time

ow = onewire.OneWire(Pin(26))   #Init wire
报错  AttributeError: 'OneWire' object has no attribute 'init'






SatJuly-202307085658..png

luokia  学徒
 楼主|

发表于 2023-7-8 02:48:01

看起来是固件版本的问题,新ESP32固件版本无法读到DS18B20,而旧版本可以
SatJuly-202307082296..png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail