전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

WS2812 데이터시트(PDF) 87 Page - Raspberry Pi Holdings PLC

부품명 WS2812
상세설명  Created by Phillip Burgess
PDF  98 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  RASPBERRY-PI [Raspberry Pi Holdings PLC]
홈페이지  https://www.raspberrypi.com/
Logo RASPBERRY-PI - Raspberry Pi Holdings PLC

WS2812 데이터시트(HTML) 87 Page - Raspberry Pi Holdings PLC

Back Button WS2812 Datasheet HTML 83Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 84Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 85Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 86Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 87Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 88Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 89Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 90Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 91Page - Raspberry Pi Holdings PLC Next Button
Zoom Inzoom in Zoom Outzoom out
 87 / 98 page
background image
That's all there is to getting started with CircuitPython and NeoPixel LEDs!
Full Example Code
import time
import board
import neopixel
# On CircuitPlayground Express, and boards with built in status NeoPixel -> board.NEOPIXEL
# Otherwise choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D1
pixel_pin = board.NEOPIXEL
# On a Raspberry pi, use this instead, not all pins are supported
# pixel_pin = board.D18
# The number of NeoPixels
num_pixels = 10
# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reversed!
# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW.
ORDER = neopixel.GRB
pixels = neopixel.NeoPixel(
pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if pos < 0 or pos > 255:
r = g = b = 0
elif pos < 85:
r = int(pos * 3)
g = int(255 - pos * 3)
b = 0
elif pos < 170:
pos -= 85
r = int(255 - pos * 3)
g = 0
b = int(pos * 3)
else:
pos -= 170
r = 0
g = int(pos * 3)
b = int(255 - pos * 3)
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
Page 90 of 101



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com