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: usermods/PIR_sensor_switch/readme.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,23 +25,24 @@ You can also use usermod's off timer instead of sensor's. In such case rotate th
25
25
26
26
**NOTE:** Usermod has been included in master branch of WLED so it can be compiled in directly just by defining `-D USERMOD_PIRSWITCH` and optionally `-D PIR_SENSOR_PIN=16` to override default pin. You can also change the default off time by adding `-D PIR_SENSOR_OFF_SEC=30`.
27
27
28
-
## API to enable/disable the PIR sensor from outside. For example from another usermod:
28
+
## API to enable/disable the PIR sensor from outside. For example from another usermod
29
29
30
30
To query or change the PIR sensor state the methods `bool PIRsensorEnabled()` and `void EnablePIRsensor(bool enable)` are available.
31
31
32
32
When the PIR sensor state changes an MQTT message is broadcasted with topic `wled/deviceMAC/motion` and message `on` or `off`.
33
33
Usermod can also be configured to send just the MQTT message but not change WLED state using settings page as well as responding to motion only at night
34
34
(assuming NTP and latitude/longitude are set to determine sunrise/sunset times).
35
35
36
-
### There are two options to get access to the usermod instance:
36
+
### There are two options to get access to the usermod instance
37
37
38
-
1. Include `usermod_PIR_sensor_switch.h`**before** you include other usermods in `usermods_list.cpp'
38
+
_1._ Include `usermod_PIR_sensor_switch.h`**before** you include other usermods in `usermods_list.cpp'
39
39
40
40
or
41
41
42
-
2. Use `#include "usermod_PIR_sensor_switch.h"` at the top of the `usermod.h` where you need it.
42
+
_2._ Use `#include "usermod_PIR_sensor_switch.h"` at the top of the `usermod.h` where you need it.
43
43
44
44
**Example usermod.h :**
45
+
45
46
```cpp
46
47
#include"wled.h"
47
48
@@ -79,25 +80,30 @@ Usermod can be configured via the Usermods settings page.
79
80
* `override` - override PIR input when WLED state is changed using UI
80
81
* `domoticz-idx` - Domoticz virtual switch ID (used with MQTT `domoticz/in`)
81
82
82
-
83
83
Have fun - @gegu & @blazoncek
84
84
85
85
## Change log
86
+
86
87
2021-04
88
+
87
89
* Adaptation for runtime configuration.
88
90
89
91
2021-11
92
+
90
93
* Added information about dynamic configuration options
91
94
* Added option to temporary enable/disable usermod from WLED UI (Info dialog)
92
95
93
96
2022-11
97
+
94
98
* Added compile time option for off timer.
95
99
* Added Home Assistant autodiscovery MQTT broadcast.
96
100
* Updated info on compiling.
97
101
98
102
2023-??
103
+
99
104
* Override option
100
105
* Domoticz virtual switch ID (used with MQTT `domoticz/in`)
101
106
102
107
2024-02
103
-
* Added compile time option to expand number of PIR sensors (they are logically ORed) `-D PIR_SENSOR_MAX_SENSORS=3`
108
+
109
+
* Added compile time option to expand number of PIR sensors (they are logically ORed) `-D PIR_SENSOR_MAX_SENSORS=3`
Copy file name to clipboardExpand all lines: usermods/audioreactive/readme.md
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,27 @@ Does audio processing and provides data structure that specially written effects
8
8
**does not** provide effects or draw anything to an LED strip/matrix.
9
9
10
10
## Additional Documentation
11
+
11
12
This usermod is an evolution of [SR-WLED](https://github.com/atuline/WLED), and a lot of documentation and information can be found in the [SR-WLED wiki](https://github.com/atuline/WLED/wiki):
13
+
12
14
*[getting started with audio](https://github.com/atuline/WLED/wiki/First-Time-Setup#sound)
13
15
*[Sound settings](https://github.com/atuline/WLED/wiki/Sound-Settings) - similar to options on the usemod settings page in WLED.
This audioreactive usermod works best on "classic ESP32" (dual core), and on ESP32-S3 which also has dual core and hardware floating point support.
21
21
22
-
It will compile successfully for ESP32-S2 and ESP32-C3, however might not work well, as other WLED functions will become slow. Audio processing requires a lot of computing power, which can be problematic on smaller MCUs like -S2 and -C3.
22
+
This audioreactive usermod works best on "classic ESP32" (dual core), and on ESP32-S3 which also has dual core and hardware floating point support.
23
+
24
+
It will compile successfully for ESP32-S2 and ESP32-C3, however might not work well, as other WLED functions will become slow. Audio processing requires a lot of computing power, which can be problematic on smaller MCUs like -S2 and -C3.
23
25
24
26
Analog audio is only possible on "classic" ESP32, but not on other MCUs like ESP32-S3.
25
27
26
-
Currently ESP8266 is not supported, due to low speed and small RAM of this chip.
28
+
Currently ESP8266 is not supported, due to low speed and small RAM of this chip.
27
29
There are however plans to create a lightweight audioreactive for the 8266, with reduced features.
28
-
## Installation
30
+
31
+
## Installation
29
32
30
33
Add 'ADS1115_v2' to `custom_usermods` in your platformio environment.
31
34
@@ -35,29 +38,31 @@ All parameters are runtime configurable. Some may require a hard reset after cha
35
38
36
39
If you want to define default GPIOs during compile time, use the following (default values in parentheses):
**NOTE** I2S is used for analog audio sampling. Hence, the analog *buttons* (i.e. potentiometers) are disabled when running this usermod with an analog microphone.
53
56
54
57
### Advanced Compile-Time Options
58
+
55
59
You can use the following additional flags in your `build_flags`
*`-D I2S_USE_RIGHT_CHANNEL`: Use RIGHT instead of LEFT channel (not recommended unless you strictly need this).
59
64
*`-D I2S_USE_16BIT_SAMPLES`: Use 16bit instead of 32bit for internal sample buffers. Reduces sampling quality, but frees some RAM ressources (not recommended unless you absolutely need this).
60
-
*`-D I2S_GRAB_ADC1_COMPLETELY`: Experimental: continuously sample analog ADC microphone. Only effective on ESP32. WARNING this _will_ cause conflicts(lock-up) with any analogRead() call.
65
+
*`-D I2S_GRAB_ADC1_COMPLETELY`: Experimental: continuously sample analog ADC microphone. Only effective on ESP32. WARNING this *will* cause conflicts(lock-up) with any analogRead() call.
61
66
*`-D MIC_LOGGER` : (debugging) Logs samples from the microphone to serial USB. Use with serial plotter (Arduino IDE)
62
67
*`-D SR_DEBUG` : (debugging) Additional error diagnostics and debug info on serial USB.
Copy file name to clipboardExpand all lines: usermods/project_cars_shiftlight/readme.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
###Shift Light for Project Cars
1
+
# Shift Light for Project Cars
2
2
3
3
Turn your WLED lights into a rev light and shift indicator for Project Cars.
4
4
It's easy to use.
5
5
6
-
1. Make sure your WLED device and your PC/console are on the same network and can talk to each other
6
+
_1._ Make sure your WLED device and your PC/console are on the same network and can talk to each other
7
7
8
-
2. Go to the gameplay settings menu in PCARS and enable UDP. There are 9 numbers you can choose from. This is the refresh rate. The lower the number, the better. However, you might run into problems at faster rates.
8
+
_2._ Go to the gameplay settings menu in PCARS and enable UDP. There are 9 numbers you can choose from. This is the refresh rate. The lower the number, the better. However, you might run into problems at faster rates.
9
9
10
10
| Number | Updates/Second |
11
11
| ------ | -------------- |
@@ -19,5 +19,5 @@ It's easy to use.
19
19
| 8 | 05 |
20
20
| 9 | 1 |
21
21
22
-
3. Once you enter a race, WLED should automatically shift to PCARS mode.
23
-
4. Done.
22
+
_3._ Once you enter a race, WLED should automatically shift to PCARS mode.
Copy file name to clipboardExpand all lines: usermods/readme.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
###Usermods
1
+
# Usermods
2
2
3
3
This folder serves as a repository for usermods (custom `usermod.cpp` files)!
4
4
5
5
If you have created a usermod you believe is useful (for example to support a particular sensor, display, feature...), feel free to contribute by opening a pull request!
6
6
7
7
In order for other people to be able to have fun with your usermod, please keep these points in mind:
8
8
9
-
- Create a folder in this folder with a descriptive name (for example `usermod_ds18b20_temp_sensor_mqtt`)
10
-
- Include your custom files
11
-
- If your usermod requires changes to other WLED files, please write a `readme.md` outlining the steps one needs to take
12
-
- Create a pull request!
13
-
- If your feature is useful for the majority of WLED users, I will consider adding it to the base code!
9
+
* Create a folder in this folder with a descriptive name (for example `usermod_ds18b20_temp_sensor_mqtt`)
10
+
* Include your custom files
11
+
* If your usermod requires changes to other WLED files, please write a `readme.md` outlining the steps one needs to take
12
+
* Create a pull request!
13
+
* If your feature is useful for the majority of WLED users, I will consider adding it to the base code!
14
14
15
15
While I do my best to not break too much, keep in mind that as WLED is updated, usermods might break.
16
16
I am not actively maintaining any usermod in this directory, that is your responsibility as the creator of the usermod.
0 commit comments