LED Ring NeoPixel: Difference between revisions
Jump to navigation
Jump to search
Created page with "= Description = Text Image(s) = How to connect it electrically = Text Image(s) = How to control it in MicroPython = <syntaxhighlight lang="python" line='line'> # todo #..." |
|||
Line 12: | Line 12: | ||
= How to control it in MicroPython = | = How to control it in MicroPython = | ||
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
# | import neopixel | ||
# | from machine import Pin | ||
# number of leds | |||
n=8 | |||
# connected Pin | |||
p=0 | |||
np = neopixel.NeoPixel(Pin(p),n) | |||
# sets color of the led at position 0 to (r,g,b) | |||
np[0] = (255,0,0) | |||
# colors the leds | |||
np.write() | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 12:29, 19 August 2020
Description
Text
Image(s)
How to connect it electrically
Text
Image(s)
How to control it in MicroPython
import neopixel
from machine import Pin
# number of leds
n=8
# connected Pin
p=0
np = neopixel.NeoPixel(Pin(p),n)
# sets color of the led at position 0 to (r,g,b)
np[0] = (255,0,0)
# colors the leds
np.write()
A small Program in MicroPython
# todo
# code goes here
text
image(s)
Related Tutorial Videos
change to the right video
Background
text
image(s)