在使用BME280气压传感器时, 出现这个错误:OSError:...
本帖最后由 swl401 于 2025-6-27 09:53 编辑在使用BME280气压传感器时, 出现这个错误:OSError: ENODEV掌控板2.2在mpython0.8.6和mpython0.8.7都是同样的错误
掌控板3.0报的是NameError: name 'BME280' isn't defined
#############from mpython import *
bme280=BME280()
import time
while True:
print(bme280.pressure())
print(bme280.temperature())
print(bme280.humidity())
time.sleep(1)
###########
$#mac:9454C5B11168#$
MicroPython v2.5.0-mpython-5-g1f43e26 on 2025-06-20; mpython with ESP32
Type "help()" for more information.
>>>
raw REPL; CTRL-B to exit
>OK
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 47, in <module>
File "mpython.py", line 1012, in __init__
OSError: ENODEV
>
MicroPython v2.5.0-mpython-5-g1f43e26 on 2025-06-20; mpython with ESP32
Type "help()" for more information.
>>>
页:
[1]