File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,32 @@ need to be specified as it is computed from the supplied ``pixel_order``.
110110 pixel = neopixel.NeoPixel(board.D0, 1 , pixel_order = neopixel.RGBW )
111111 pixel[0 ] = (30 , 0 , 20 , 10 )
112112
113+ Setup for sudo-less usage on Raspberry Pi boards
114+ ================================================
115+ 1. Enable both SPI and Serial port hardware (Serial interface). Do it by ``raspi-config `` tool or manually by adding
116+
117+ ::
118+
119+ dtparam=spi=on
120+ enable_uart=1
121+
122+ to the ``/boot/config.txt ``
123+
124+ 2. Reboot the Pi to apply the changes - the hardware setup takes place during boot.
125+ 3. Connect LED's DIN to ``GPIO10 `` (physical pin 19)
126+
127+ When initializing the ``NeoPixel `` object **always ** do it with ``board.D10 `` (GPIO10)
128+
129+ .. code-block :: python
130+
131+ import board
132+ import neopixel
133+
134+ DATA_PIN = board.D10
135+ pixel = neopixel.NeoPixel(DATA_PIN , ... )
136+
137+ Now you can execute the code using ``python `` without ``sudo ``
138+
113139Documentation
114140=============
115141
You can’t perform that action at this time.
0 commit comments