我使用这里的代码。从 Thonny 运行多次后没有出现问题,我得到:
操作系统错误:[Errno 12] ENOMEM
我使用 nuke.uf2 清除 Raspberry Pi Pico W 上的存储。运行该文件太多次后,错误再次出现。nuke.uf2 是一个临时修复。
###############################################################
# WS2812 RGB LED Ring Light Breathing
# with the Raspberry Pi Pico Microcontroller
#
# by Joshua Hrisko, Maker Portal LLC (c) 2021
#
# Based on the Example neopixel_ring at:
# https://github.com/raspberrypi/pico-micropython-examples
###############################################################
#
import array, time
from machine import Pin
import rp2
#
############################################
# RP2040 PIO and Pin Configurations
############################################
#
# WS2812 LED Ring Configuration
led_count = …Run Code Online (Sandbox Code Playgroud)