| Motore di ricerca datesheet componenti elettronici |
|
WS2812 Scheda tecnica(PDF) 86 Page - Raspberry Pi Holdings PLC |
|
|
|||||||||||||||||||||||||||||
WS2812 Scheda tecnica(HTML) 86 Page - Raspberry Pi Holdings PLC |
|
86 / 98 page ![]() Once that's done, from your command line run the following command: sudo pip3 install adafruit-circuitpython-neopixel If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported! CircuitPython & Python Usage To demonstrate the usage of this library with NeoPixel LEDs, we'll use the board's Python REPL. Run the following code to import the necessary modules and initialise a NeoPixel strip with 30 LEDs. Don't forget to change the pin if your NeoPixels are connected to a different pin, and change the number of pixels if you have a different number. import board import neopixel pixels = neopixel.NeoPixel(board.D5, 30) # Feather wiring! # pixels = neopixel.NeoPixel(board.D18, 30) # Raspberry Pi wiring! Now you're ready to light up your NeoPixel LEDs using the following properties: brightness - The overall brightness of the LED fill - Color all pixels a given color. show - Update the LED colors if auto_write is set to False . For example, to light up the first NeoPixel red: pixels[0] = (255, 0, 0) To light up all the NeoPixels green: pixels.fill((0, 255, 0)) For NeoPixels to work on Raspberry Pi, you must run the code as root! Root access is required to access the RPi peripherals. © Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 89 of 101 |
|
Link URL |
| Lei ha avuto il aiuto da alldatasheet? [ DONATE ] |
Di alldatasheet | Richest di pubblicita | contatti | Privacy Policy | Collegamento alla scheda tecnica | scambio Link | Ricerca produttore All Rights Reserved©Alldatasheet.com |
| 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 |