Forum

Einloggen | Registrieren | RSS  

ersteinmal(R)

E-Mail

01.01.2023,
14:08
 

WS2812 als Lauflicht programmieren (Elektronik)

Hallo!

Einleitung: Ich möchte als mien erstes Programm eine WS2811 zum Laufen bringen, aber leider scheiterte ich daran, daß ich nicht die 0,35µs und 1,35µs über utime einstellen konnte. Also fand ich die oben benannte Beschreibung. ===== Kinderleicht =====

Nur benötige ich dafür "neopixel" was nicht in Thonny installiert war. Meine Versuche über "Verwalte Plug in " und "Verwalte Pakete

hat offenbar nichts gebracht.

Jetzt bastele ich wieder an DLL und Zeug anstatt zu programmieren, und gehen tut es auch nicht.

.


MicroPython v1.16 on 2021-06-18; Raspberry Pi Pico with RP2040

Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/lib/neopixel/__init__.py", line 1, in <module>
File "/lib/neopixel/dsp.py", line 1, in <module>
ImportError: no module named 'numpy.ndarray'
>>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/lib/neopixel/__init__.py", line 1, in <module>
File "/lib/neopixel/dsp.py", line 1, in <module>
ImportError: no module named 'numpy.ndarray'
>>>


# WS2812 als Lauflicht programmieren
#https://www.elektronik-kompendium.de/sites/raspberry-pi/2703111.htm
# Bibliotheken laden
from machine import Pin
from neopixel import NeoPixel

Kann jemand helfen?

Danke Carsten

Gast

01.01.2023,
15:59

@ ersteinmal

WS2812 als Lauflicht programmieren

Steht dir ein Arduino oder Clone zur Verfügung? Damit ist es leichter als mit dem Raspi.

GerK(R)

01.01.2023,
17:02

@ ersteinmal

WS2812 als Lauflicht programmieren

Neopixel ist in Micropython enthalten und hat nichts mit Thonny zu tun.
Warum willst Du Numpy importieren? Das läuft auf Micropython nicht.
Kopier das Programm so wie es ist auf deinen Pico und es wird funktionieren.