Skip to content

Commit

Permalink
Merge branch 'Aircoookie:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonModules authored Nov 5, 2024
2 parents a118cec + af8e14d commit 303b836
Show file tree
Hide file tree
Showing 40 changed files with 100 additions and 50 deletions.
2 changes: 1 addition & 1 deletion docs/about/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Fil
Quindor (Andries F.) - designed Dig-Quad, Dig-Uno, etc.
[@Serg74](https://github.com/srg74) - designed controllers and shields - contributes code - hosts nightly build binaries
Tonyno - tireless user support and documentation
Wladi - contributes documentation and maintains [WLED FAQ](https://wled-faq.github.io) unofficial documentation.
[Wladislaw Waag](https://www.myhome-control.de/) - contributes documentation and maintains [WLED FAQ](https://wled-faq.github.io) (unofficial documentation in German/English), [WLED calculator](https://wled-calculator.github.io/) and [WLED unofficial installer](https://wled-install.github.io/).
### Used Libraries and Dependencies

[ESP8266](https://github.com/esp8266/Arduino)/[ESP32](https://github.com/espressif/arduino-esp32) Arduino Core
Expand Down
24 changes: 16 additions & 8 deletions docs/advanced/audio-reactive.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ Currently only ESP32 microcontrollers are supported.

## Hardware required

The audio must be "feed" into the microcontroller. There are basically two options: using microphones or line-in adapters.
The audio must be "feed" into the microcontroller. There are basically four options: using microphones, line-in adapters, another WLED instance or directly from a PC.

### Microphones supported

Three microphone types are supported:

#### 1. Analog microphones
#### 1. Analog microphones - Not recommended

Examples are MAX4466 (not really good) and MAX9814 (slightly better). These microphones are easy to use: you just have to connect 3.3V, GND and the analog output from the microphone to an ADC input (Analog-to-Digital Converter) of ESP32. However, the big disadvantage is the quality: both from the microphones themselves and from the ADCs integrated into microcontrollers, which are actually not well suited for audio processing and highly influenced by the power supply noise.
Examples are MAX4466 (really not good) and MAX9814 (slightly better). These microphones are easy to use: you just have to connect 3.3V, GND and the analog output from the microphone to an ADC input (Analog-to-Digital Converter) of ESP32. However, the big disadvantage is the quality: both from the microphones themselves and from the ADCs integrated into microcontrollers, which are actually not well suited for audio processing and are highly influenced by the power supply noise.
![Example analog microphone](../assets/images/content/example_analog_mic.jpg)

!!! info "Analog microphones and analog buttons (potentiometers) rule out each other"
WLED can use analog microphones or [analog buttons](/features/macros/#analog-button) but not both at the same time!

#### 2. I2S digital microphones
#### 2. I2S digital microphones - Better option

Examples are INMP441 and ICS-43434/ICS-43432. These have an integrated ADC and already output a digital signal. The advantage is the best possible quality. The disadvantage is higher complexity (you need several PINs for a digital signal). For proper trouble-free operation keep wires between the microphone and ESP32 as short as possible and solder them properly.

Expand All @@ -52,14 +52,22 @@ At least a simple analog circuit as shown below is required to prepare the analo

In some cases, you can do it without this circuit and connect the GND of the audio source and an audio channel (left or right) directly to ESP32 ADC Pin (GND and analog input, e.g. GPIO36 pin on the ESP32). This solution is rather quite dirty workaround and might work well or not at all.

#### 2. Line-in to I2S adapter
#### 2. Line-in to I2S adapter - Best Option

Line-in to I2S adapter converts the analog line-out or headphone signal into a digital I2S signal that can be proceed by ESP32. There are some general or for WLED specially developed analog-to-I2S adapters based on for example CirrusLogic CS5343, TI PCM1808 or es7243 chips on the market. In this case, the whole thing works like with a digital I2S microphone. The only difference to I2S microphone is that you at least need an extra PIN for MCLK (Master Clock) signal, which can only be generated by the ESP32 on GPIOs 0, 1 or 3. The other complication is that MCLK is a high frequency signal and must be wired extremely accurate and have short wires. Some adapter types also require more additional signals. For stability it is better to use ready-to-use controller with special Line-In to I2S adapter or DIY PCB design where you can integrate general analog-to-I2S adapter directly without long wires.
Line-in to I2S adapter converts the analog line-out or headphone signal into a digital I2S signal that can be processed by ESP32. There are some general or for WLED specially developed analog-to-I2S adapters based on for example CirrusLogic CS5343, TI PCM1808 or es7243 chips on the market. In this case, the whole thing works like with a digital I2S microphone. The only difference with I2S microphone is that you at least need an extra PIN for MCLK (Master Clock) signal, which can only be generated by the ESP32 on GPIOs 0, 1 or 3. The other complication is that MCLK is a high-frequency signal and must be wired extremely carefully and have short wires. Some adapter types also require more additional signals. For stability, it is better to use a ready-to-use controller with a special Line-In to I2S adapter or DIY PCB design where you can integrate a general analog-to-I2S adapter directly without long wires.

An example board with integrated Line-In is the [LyraT](https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/board-esp32-lyrat-v4.3.html)

![Examples analog to I2S](../assets/images/content/examples_analog_to_i2s.jpg)

For some more details please refer to [Sound Reactive WLED WIKI](https://github.com/atuline/WLED/wiki)
For some more details please refer to [Sound Reactive WLED WIKI](https://mm.kno.wled.ge/soundreactive/introduction/)

### Audio Sync - WLED
You do not need to include an audio input source in every WLED device to take advantage of the Audio Reactive effects. Simply set the sync mode to "send" on the device with the audio input and all the other devices set to "receive" for their sync mode in the Audio Reactive settings.

### Audio Sync - WledSRServer
For Windows, there is [WledSRServer](https://github.com/Victoare/SR-WLED-audio-server-win) which is a small application that can capture audio directly from your PC, process it into WLED Audio Sync data and send it out onto your network - emulating WLED in send mode. Configure all your WLED instances to receive.

## Software required

Because audio reactive capability is currently implemented as a usermod, you need WLED compiled with this usermod included or use Sound Reactive WLED fork. The [official WEB-based WLED installer](https://install.wled.me/) does not include original WLED with audio reactive usermod, but offers Sound Reactive WLED as an option. The [unofficial WEB-based WLED installer](https://wled-install.github.io/) offers more options including original WLED with audio reactive usermod.
Because audio reactive capability is currently implemented as a usermod, you need WLED compiled with this usermod included. The [official WEB-based WLED installer](https://install.wled.me/) does not include original WLED with audio reactive usermod, but offers Sound Reactive WLED as an option. The [unofficial WEB-based WLED installer](https://wled-install.github.io/) offers more options including original WLED with audio reactive usermod.
13 changes: 8 additions & 5 deletions docs/advanced/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@ A: Technically not. The ESP8266 uses unencrypted HTTP traffic. Implementing HTTP

A: WLED comes with the ability to carry out a software update via WiFi (OTA). However, no one must be able to flash a malicious new binary firmware to steal your WiFi credentials or make your ESP part of a botnet. Therefore, you should enable the "OTA Lock" setting and change its default passphrase "wledota".

### 3: Can I protect the light configuration or the settings page?
### 3: Can I protect the light configuration?

A: Currently not. This is not sensitive information like your WiFi password. Anyone with your IP and port can control the lights. Open an issue if it should ever happen that somebody plays with your lights. I might consider adding an optional password lock then. For now, it is way too cumbersome for what it does.

### 4: I want to do a software update, but it says "OTA lock active"?
### 4: Can I protect the settings page?
A: Yes, you can set a settings PIN in the `Security & Update setup`. Remember that WLED uses unencrypted transmission, so be prutent when selecting a PIN and do NOT reuse banking, etc. pin. After changing or entering the PIN, WLED will stay unlocked for 15 minutes before asking again when accessing any of the settings pages.

### 5: I want to do a software update, but it says "OTA lock active"?

A: You need to go to the settings page. Untick the "OTA Lock" setting and input your passphrase in the field below it.
Now apply the settings and reboot. After that you can carry out the software update. Don't forget to re-enable OTA Lock afterwards! To enable, you don't have to enter the passphrase, unless you want to change it. For the lock to work you need to apply and reboot again.

### 5: Why is this OTA lock stuff that important?
### 6: Why is this OTA lock stuff that important?

A: Your unencrypted WiFi password is stored in the module's EEPROM. It would be easy to "update" the software to a malicious version which sends your password to the attacker. OTA Lock makes sure only those with the passphrase may carry out a software update. And yes, while you can disable OTA lock by doing a factory reset, this would also kill the WiFi connection to the attacker.

### 6: Anything else?
### 7: Anything else?

A: A personal tip from me is not to give anyone your IP to control the software who you do not wish to do so on a regular basis. It is not critical from a security standpoint, but it can be very annoying if someone plays with your lights, or even worse, change your AP credentials to the point where you can no longer access the module except via USB.
A: A personal tip from me is not to give anyone your IP to control the software who you do not wish to do so on a regular basis. It is not critical from a security standpoint, but it can be very annoying if someone plays with your lights, or even worse, change your AP credentials to the point where you can no longer access the module except via USB.
Binary file added docs/assets/images/content/12Vanalog_wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/D1_mini_pinout.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/brightness_limiter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/example_analog_linein.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/example_analog_mic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/example_gpio_set.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/example_i2s_mic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/example_i2s_mic_controller.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/examples_analog_to_i2s.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/led_strip_direction.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic29.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic44.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pic46.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pir_sensor_as_pir.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pir_sensor_as_switch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/pir_sensor_hc_sr501.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/preset_api_example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/content/wled_ethernet_settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 303b836

Please sign in to comment.