You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+36-3
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,9 @@ The strip can be controlled either via hardware or software spi. The preferred m
6
6
**If you want to use an WS281X strip like i.e. WS2812B you can not use the build in sound output of the Raspberry Pi because both machnism use PWM. The installation guide will show you how to disable the kernel module of the on-board sound card!**
7
7
8
8
## Wiring ##
9
-
The strip uses 5V spi lanes but the Raspberry uses 3.3V. We need to use an level converter to get rid of this problem. Connecting the strip directly to the Pi may cause harm to it.
10
-
11
-
The buttons will be connected with a 2kOhm pull down resistor each. The resistors will pull down the gpio to 0V if the buttons are not pressed. When the buttons are pressed the gpio pins will be connected to the 3.3V lane which results in an high flag.
9
+
The strip uses 5V spi lanes but the Raspberry uses 3.3V. We need to use an level converter to get rid of this problem. Connecting the strip directly to the Pi may cause harm to it!
12
10
11
+
There are different possibilities to wire the buttons. I will show three examples.
13
12
14
13
### Wiring WS2801 ###
15
14
This example uses the hardware spi pins to connect the led strip.
@@ -27,6 +26,31 @@ This example uses the GPIO21. 10, 12 and 18 are supported, also.
### Wiring the Buttons with pull-down resistors ###
30
+
GPIO pins do not have an inital default state. To get one we connect an resistor to the ground and to the pin. The GPIO then is low and will be set to high if the switch is pressed and the connection to the VCC pin is closed.
31
+
32
+

33
+
34
+
You need to set "LED_BTN_TRIGGER_ON_HIGH=1" in the environment file to get this setup work (default)!
35
+
36
+
### Wiring the Buttons with pull-up resistors ###
37
+
GPIO pins do not have an inital default state. To get one we connect an resistor to the VCC and to the pin. The GPIO then is high and will be set to low if the switch is pressed and the connection to the ground pin is closed.
38
+
39
+
This setup is more robust against influnces of other electronical devices like frigerators or microwaves.
40
+
41
+

42
+
43
+
You need to set "LED_BTN_TRIGGER_ON_HIGH=0" in the environment file to get this setup work!
44
+
45
+
### Wiring the Buttons with pull-up resistors and capacitors###
46
+
GPIO pins do not have an inital default state. To get one we connect an resistor to the VCC and to the pin. The GPIO then is high and will be set to low if the switch is pressed and the connection to the ground pin is closed.
47
+
48
+
This setup is more robust against influnces of other electronical devices like frigerators or microwaves than the one which only uses pull-up resistors.
49
+
50
+

51
+
52
+
You need to set "LED_BTN_TRIGGER_ON_HIGH=0" in the environment file to get this setup work!
53
+
30
54
## Installation ##
31
55
### General###
32
56
```
@@ -118,6 +142,8 @@ Open the file /home/pi/ledcontrol/ledcontrol.env in your favorit editor. In exam
118
142
LED_BTN_TWO_GPIO=27
119
143
#How many milliseconds should be waited before another press of the same button is accepted?
120
144
LED_BTN_DEBOUNCE_DELAY=300
145
+
#Should the button be triggerd on a high (default) or low value of the gpio
146
+
LED_BTN_TRIGGER_ON_HIGH=1
121
147
122
148
#How many leds does the connected led stripe have?
123
149
LED_MAX_LEDS=160
@@ -159,6 +185,13 @@ Open the file /home/pi/ledcontrol/ledcontrol.env in your favorit editor. In exam
159
185
LED_PONG_RESULT_DELAY_DURING=2
160
186
#How many seconds should the final result be displayed (fraction support!)?
161
187
LED_PONG_RESULT_DELAY_AFTER=5
188
+
189
+
#Should the status be published after every config change? This is only needed if you use two different sources to change the configuration of the strip and want the second source to be updated if the first source changes a value.
190
+
LED_PUBLISH_STATUS_AFTER_EVERY_CONFIG_CHANGE=0
191
+
#Should the status be published if the output state changed? This feature is enabled because if one of the buttons gets pressed and you have an control source active the source gets informed that the output state changed.
192
+
LED_PUBLISH_STATUS_IF_TOGGLED=1
193
+
#Should the status be published at the script start?
Copy file name to clipboardexpand all lines: ledcontrol.env.example
+4-1
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ LED_BTN_ONE_GPIO=17
31
31
LED_BTN_TWO_GPIO=27
32
32
#How many milliseconds should be waited before another press of the same button is accepted?
33
33
LED_BTN_DEBOUNCE_DELAY=300
34
+
#Should the button be triggerd on a high (default) or low value of the gpio
35
+
LED_BTN_TRIGGER_ON_HIGH=1
34
36
35
37
#How many leds does the connected led stripe have?
36
38
LED_MAX_LEDS=160
@@ -75,6 +77,7 @@ LED_PONG_RESULT_DELAY_AFTER=5
75
77
76
78
#Should the status be published after every config change? This is only needed if you use two different sources to change the configuration of the strip and want the second source to be updated if the first source changes a value.
77
79
LED_PUBLISH_STATUS_AFTER_EVERY_CONFIG_CHANGE=0
78
-
79
80
#Should the status be published if the output state changed? This feature is enabled because if one of the buttons gets pressed and you have an control source active the source gets informed that the output state changed.
80
81
LED_PUBLISH_STATUS_IF_TOGGLED=1
82
+
#Should the status be published at the script start?
0 commit comments