Commit Graph

645 Commits

Author SHA1 Message Date
ezcGman
19146d8012 UM SHT: Made type a setting instead of buildflag 2022-12-12 02:05:02 +01:00
ezcGman
987dd36401 UM SHT: Using F() helper on some strings 2022-12-11 22:32:03 +01:00
Blaz Kristan
6bb158786b Fix for switching WLED off when in nighttime only mode. 2022-12-11 20:10:24 +01:00
Bill Thomson
f66d091717
Update README.md (#2943)
This change corrects of one of my earlier edits. (removes an extra word in the sentence)
2022-12-11 18:03:35 +01:00
ezcGman
e8edb99bb0 UM SHT: Added SHT usermod 2022-12-11 01:16:14 +01:00
Blaz Kristan
93fe8c2818 Minor adjustment. 2022-12-10 19:58:34 +01:00
srg74
8caeddde15
Spelling check by @wthomson (#2940)
A lot of spelling corrections. Now repo will sound like educated person :)

Co-authored-by: Bill Thomson <bt@kattt.org>
2022-12-10 16:12:55 +01:00
Blaz Kristan
e186b0568d Bugfix. 2022-12-10 01:44:16 +01:00
Blaž Kristan
b24c8b3410
BobLight protocol (#2917)
* BobLight ambilight protocol implementation for WLED

* Added usermod ID

* Add realtime locking
Add port config
Bugfixes

* Minor optimisation.

* Fix WiFiServer start.

* Bugfix

* Working boblight.

* npm run

* Add readme

* Undo PIR sensor modification.
Undo npm run build.

* Fix parentheses.

* Comments.
Cancel realtime when disabled.
2022-12-08 19:41:50 +01:00
Blaz Kristan
10196ea4e5 remove comment 2022-12-03 21:22:48 +01:00
cschwinne
efc476e50b Disable register keyword to reduce compiler warnings
Minor formatting improvements
"ps" string optimization
Removed travis envs
2022-12-03 20:55:17 +01:00
Blaz Kristan
f85a6f7c3c Force AP mode on power bounce
-  requires 3 power cycles
2022-12-03 12:35:48 +01:00
Ardi Loot
bd601ad2da
PWM outputs usermod (#2912)
* first commit of PWM outputs

* fix pin deallocation issue

* refactoring

* removed debug prints

* fix compile error

* added readme

* added compile error for ESP8266

* added overloaded SetDuty method

* convert state to separate nested object

* Revert "added overloaded SetDuty method"

This reverts commit e8ea32f577.

* move constant strings to flash

* reworked json info and config

* bugfixes

* more bugfixes

* updated readme

* use C strings instead of String

* added uint8 and uint16 overloads for SetDuty

* removed ambiguous overload
2022-11-30 09:15:07 +01:00
Blaž Kristan
9f1a7a1c20 Swap info. 2022-11-29 15:02:56 +01:00
Frank
98138a02e3
audioreactive usermod update (align with MoonMod code) (#2907)
* audioreactive driver update

- Better handling of PDM and I2S Line-in
- Bugfixes for ES7243 (allocateMultiplePins)
- More error messages for ES7243
- sample scaling (needed for sources that use full scale of samples)

* audiorective update

* align SR_DEBUG with WLED_DEBUG
* optional bandpass filter (needed for PDM mics)
* sample scaling for PDM and Line-In
* small improvements for analog input
* bugfixes and small performance improvements
* code for FFT task refactored, for better readablity. Introduces separate functions for filtering and post-processing
* small improvement for beat detection
* default mic settings can be configured at compile time
* correct mic type if MCU does not support PDM or ADC
* hide analog PIN config if not supported by MCU

* audioreactive updates

- minor updates to source code (see discussion in PR #2907)
- usermod readme improvements

* small readme update

* one think I overlooked

* ok, another edit. Now its final. Hopefully.

* small upps

wrong parameter order in debug message.
2022-11-28 20:52:33 +01:00
Ewoud
78e9f5bd1a
Clean up UserMod settings: grouping of variables and add preInfo to variables (#2894)
* Grouping um settings, add pre and post Info, update  SR & 4LD settings

Settings_um.htm: 
- modify addField (grouping)
- addInfo (pre and post texts)

Add preInfo to audio reactive and 4ld usermod

Extra:
platformio: wemos_shield: add audio reactive usermod and update to alt display

* um settings: cpp: lowercase, js: initcap

* um settings: txt only pre, txt2 only post and initCap as function

* Fix rotary encoder info string

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2022-11-26 03:44:04 +01:00
Blaz Kristan
8899684092 Select custom palette bugfix. 2022-11-25 17:33:29 +01:00
Blaz Kristan
8e30e4925c BME280 fixes and optimisations
- MQTT not required
- minor string optimisations
- added enable option
2022-11-25 16:45:21 +01:00
Blaz Kristan
caef289b9b Autosave enable/disable UI button 2022-11-20 15:50:42 +01:00
Constantin Wolf
f104fb0586
SD card support: MMC or configurable SPI (#2877)
Co-authored-by: constantin wolf <constantin.wolf@pwc.com>
2022-11-14 02:30:35 +01:00
degraafm76
75e410e4b4
Analog clock time offset bugfix + optional hour mark feature (#2860)
* Implement optional hour marks
Time offset did not work

* removed undefined error int in hexstringtocolor

* revert cosmetic changes

* minor cosmetic changes

Co-authored-by: mdegraaf <mdegraaf@proxsys.nl>
2022-11-14 02:30:18 +01:00
Blaz Kristan
1e104bdd9e Compile time option for PIR sensor off timer 2022-11-07 16:56:41 +01:00
Blaž Kristan
d30e219d7b Faster strip updates. 2022-11-04 08:27:35 +01:00
Blaz Kristan
17d1ca82a6 Update Animated Staircas for 0.14 2022-11-03 21:04:40 +01:00
Blaz Kristan
e88d34ea19 Correct HA discovery topic & minor adjutments.
Publish on MQTT connect.
2022-10-25 21:47:25 +02:00
Blaz Kristan
535f285287 Add HA discovery option to PIR sermod 2022-10-24 21:25:23 +02:00
Alex Barlow
7288e5a8fd Fix Enabled Toggle
Adjusted inherited 'disabled' to fix saving bug.
2022-10-24 18:17:37 +01:00
bwente
fe09c417ff
Create v2 usermod_word_clock_matrix.h (#2473)
* Create usermod_word_clock_matrix.h

Tried using the old usermod on the new build, found out a lot has changed since then. My best attempt to update it. Still needs some help, but it is working. I would like to preconfigure some of the default settings. I am also having an issue with  Error 12: Preset Not Found

* Update readme.md
2022-10-22 11:21:46 +02:00
Blaz Kristan
ca891b0e70 Merge branch 'audioreactive-prototype' of https://github.com/blazoncek/WLED into audio-fix 2022-10-22 11:13:02 +02:00
Blaz Kristan
af3ee35c50 Merge branch 'dev' into audioreactive-prototype 2022-10-21 23:47:31 +02:00
Frank
ba0bc31525 UDP sound sync: added decoder for legacy packets
support decoding of sound sync data from SR version > 0.13.0
2022-10-21 12:12:02 +02:00
albarlow
30a029c19f
BH1750 upgrades (#2725)
* BH1750 upgrades

Moved the definitions into the main usermods_list.cpp instead of having a section to copy across.

Added Home Assistant Discovery topic for light sensor.  This is toggleable from the usermod menu.

* Configure pin, other enhancements, readme

Implemented pin manager
Made pins configurable at runtime
Improved info screen outputs
Added F() around strings
Updated readme

* Resolve conflict

* Merge branch 'main'

* Missing comma

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-10-21 03:32:44 +02:00
Dimitry
7cac609c06
Add ADS1115 usermod (#2752)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-21 03:25:36 +02:00
Sebastian Schmailzl
c2ac215d43
Usermod: Ping Pong Clock (#2746)
* Starting on Ping Pong Clock Usermod, still having to check the led indices and test the stuff out of it

* Adding some attributes to be configured, Added platformio_override

* Fixed LED Numbering, Changed Color to RGB to Work with Settings

* Removing LED Positions from Config

* Some documenting

* Removed example comments to make ping pong clock mod more readable

Co-authored-by: Schmailzl, Sebastian <sebastian.schmailzl@wk-it.com>
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-10-21 01:47:25 +02:00
Egor
c47972d500
Adapting for the new WLED release: (#2802)
Removed longPressMacro call
  Fix debug calls
  Fix typos
2022-10-21 01:31:43 +02:00
lordjaxom
7b2836c63c
Usermod: Analog clock (#2736)
* implement analog clock as a usermod

* fix some bugs, use toki for time measurement, implement fading seconds

* added timezone handling to analog clock

* fixed looping second pointer, lower refresh rate

* removed mqtt debug code

* implement seconds effect choice

* adapt to 0_14 branch

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-20 10:12:17 +02:00
Steven Dashevsky
38e2fc6812
Implemented usermod for integration with smartnest.cz (#2800)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-20 01:07:32 +02:00
Bartłomiej Wiśniewski
b0037c75a3
Upgrade DHT usermod (#2833)
* Implent publishing DHT data to MQTT broker

* Fix naming and add description
2022-10-20 01:02:52 +02:00
Christian Schwinne
0de928a674
Merge branch 'main' into 0_14 2022-10-20 00:44:40 +02:00
Renaud11232
cd0471386d
Fix SSDR usermod compilation (#2825) 2022-10-12 18:18:43 +02:00
Blaz Kristan
d00a708177 Minor string optimisations. 2022-10-09 12:09:46 +02:00
Frank
64441b39ac critical bugfix
it's possible that volume samples become negative. In this scenario, our simple noise gate does stupid things, and it looks like "effects temporarily lost the sound".
This fix improves the situation, and makes sure that volume samples are always >= 0.
2022-10-06 15:39:28 +02:00
Blaž Kristan
6a3ef2a2e4
Merge pull request #2809 from ingDIY/0_14
defines improvement
2022-10-06 12:15:30 +02:00
srg74
5038e4396e
Update usermod_PWM_fan.h
Changed values for proper work.
2022-10-05 15:30:09 -04:00
Frank
1ae0dd574d fix for ADC analog
the "wait until I2S buffer fills" trick does not work for ADC sources, as the I2S sampling does not run in background for ADC.
2022-10-04 16:00:36 +02:00
Frank
78e0c3dcca make MIC_LOGGER work again
- EVERY_N_MILLIS somehow does not work. Replaced it,
- make sure that WLED_DEBUG does not report "fake FFT times" whrn FFT code was not running
2022-10-04 13:47:07 +02:00
ingDIY
bdb1e839ed Update readme.md
added description about the configuration of setting:
-D USERMOD_ROTARY_ENCODER_GPIO
2022-10-03 19:22:52 +02:00
ingDIY
503835d47e submitting PR
Here they are the PR #2776, #2803 and #2804 rebased for 0_14 branch,
I hope that now they are OK!
2022-10-02 23:23:24 +02:00
Blaž Kristan
f385af595a Add setMode() and setPalette() methods
- automatically start transition
Implement load FX defaults for HTTP API (FXD)
2022-09-29 12:49:12 +02:00
Stefan Riese
b6adbc926f
Usermod wordclock: support for upfront LEDs (#2668)
* - add ledOffset to support LEDs that are not effected by the usermode before the wordclock LEDs

* - adjust readme
2022-09-26 09:35:42 +02:00
Patrick
1daa97545b
Usermod Wordclock update to use an alternatve wiring pattern (#2757)
* Update

* update readme file

* readme update

* Update readme.md

* Update readme.md

* Update readme.md

* Update readme.md

* Update platformio.ini
2022-09-22 20:43:40 +02:00
Frank
fb00bef05f AR - necessary constants for 166Khz sampling rate
16kHz might be a good compromise on small MCU's:
- GEQ will show frequencies up to ~6Khz
- FFT process may use up to 32millis (-> 100% CPU load). Try to stay below <60% so FreeRTOS can schedule all tasks properly.

- more CPU time is left for other WLED, so it maintains LED FPS and stays responsive on web UI.
2022-09-20 18:29:27 +02:00
Frank
d7bc6b1be7 AR: optimization for small MCUs, part2
Only run FFT when the result will be used.
Please note that this also means that `FFTTime` shown in Info is only meaningful when there is sound input and not silence.

--> To get exact FFT times, the optimization can be disabled by compiling with `-D SR_DEBUG`
2022-09-19 14:09:45 +02:00
Frank
79776ae8bc AR: optimization for smaller MCUs
- this reduces "lagging behind" of I2S sampling on smaller MCU's. The maximum time for FFT is now ~20 millis.
- small improvement for SR_DEBUG
2022-09-19 13:38:52 +02:00
Frank
90b3f009af AR: small improvement for ADC analog mics
ensure that ADC parameters are properly configured.
2022-09-19 13:30:13 +02:00
Frank
6f8deb83e3 some relaxations for S2 and C3
- AR: changed "error" into warning.
- reducing max_busses (for AR) not needed on S2
2022-09-17 22:00:33 +02:00
Frank
85fc8710dd mics that need MCLK should work 2022-09-17 20:39:23 +02:00
Frank
a766ddbebc make I2S microphones work with buggy IDF4.4.x
I2S microphones were not working any more in with the newest framework - only delivers silence.
Ther reason is stupid bug in espressif I2S "compatibility" driver: RIGHT and LEFT channel are swapped, so when only asking for LEFT, we get silence from RIGHT.

Workaround: simply change LEFT to RIGHT, until the problem is fixed in ESP-IDF --> Fix tested on "classic ESP32", but still need to check behavior on -S3.
Code compiles also on -S3, -S2, and -C3.

smaller changes:
- a few changes to use new APIs (MCLK, rouing and sample resolution)
- a few additional debug messages
- put correct value into _pinConfig.mck_io_num
2022-09-16 16:58:04 +02:00
Frank
01acb08c83 minor fix (typo) 2022-09-16 16:38:24 +02:00
Blaz Kristan
dfe4d70198 Merge branch 'audioreactive-prototype' into esp32-s2 2022-09-16 15:38:44 +02:00
Soren Singh Dary
8bd8975e0a
Fixed the dependency (#2782) 2022-09-14 23:29:35 +02:00
Soren Singh Dary
2847921e5a
Fixed a type in the file name (#2781) 2022-09-14 13:56:16 +02:00
Frank
925bc3b3dd AR: get rid of annoying "type conversion" warning 2022-09-11 14:32:00 +02:00
Frank
ac10b3a5c7 compilation support for audioreactive
putting all parts that will not compile between #ifdef .... #endif
Tested on S3, cannot say what will happen on other MCUs
2022-09-11 00:12:51 +02:00
Blaz Kristan
e4fbf70568 Preset loading tuning.
Multi-relay toggle support.
Fire2012 tuning.
2D functions tuning.
Global SPI comments & tuning.
Bugfix in 4LD usermod.
On & bri support fix.
2022-09-09 17:16:52 +02:00
Frank
cf93d6bb65 more precision for debug info (FFT timing)
keep more detailed timing info for FFT and I2S (WLED_DEBUG)
2022-09-08 22:45:32 +02:00
Blaz Kristan
e8942c2968 fix for repeating debug message 2022-09-06 15:52:09 +02:00
Blaz Kristan
42d1ab8a87 Separator in Info dialog. 2022-09-03 00:01:11 +02:00
Frank
77ace76e32 Bugfix: make UDP sound sync work in AP mode
- the connected() method only get called once a Wifi STA connection is established. UDP Sound Sync should also work when sender is in AP Mode.
- added a few comments that should help to understand the code structure.
2022-09-02 13:49:12 +02:00
Frank
37ba649930 audioreactive effect improvements
- Info Page: add a small horizontal line below usermod specific part. Improves readability.
- updated 2D mapping mode of some  1D soundreactive effects
- alllow some effects to fade slowly, even slower that possible with SEGMENT.fade_out(). Looks nice.

not sure why - most effects only fade when using SEGMENT.fade_out(), while some need SEGMENT.fadeToBlackBy().
2022-09-01 14:56:01 +02:00
Blaz Kristan
26793c8428 Merge branch 'dev' into audioreactive-prototype 2022-08-30 20:13:25 +02:00
Frank
64970772c7 optimization, and moving peak detection into own function
- save 1K of RAM by optimizing out
 fftBin[].
- moved several copies of the peak reset code into a single function
- moved peak detection out of getSample().
 - call peak detection function as last step of FFTcode. More optimal, and we can be sure that fresh FFT result are available.

Peak detection/reset are now called from both tasks, so I had to move some peak-related vars out of AudioReactive class and make them global (static).
2022-08-28 16:26:34 +02:00
Frank
5c792eb869 some cleanup and re-grouping of variables
- put variables with same context next to each other.
- removed a few vars that are not needed any more.
- replaced "16" by a more descriptive constant
2022-08-28 13:13:25 +02:00
Blaz Kristan
daf67d9cf7 Whitespace cleanup.
Revert legacy effects to 1D and use mapping instead.
2022-08-24 23:04:51 +02:00
Blaž Kristan
cf0f0d77be Merge branch 'audioreactive-prototype' of https://github.com/blazoncek/WLED into merge-audio 2022-08-22 10:34:10 +02:00
Frank
be7e7ac274 AR: documentation
- clarified a misleading comment in FFTCode
- added a few more comments to describe steps of the processing
- removed some commented-out code
2022-08-22 10:08:22 +02:00
Blaz Kristan
720fae8720 Code sanitation.
Default analog pin -1
2022-08-21 19:15:42 +02:00
Frank
d053bc562f code cleanup, few optimizations, and fixing more overflows
- code cleanup in audio_reactive.h
- fixing some more under/overflows in fx.cpp
2022-08-21 13:10:16 +02:00
Blaz Kristan
450a0180f8 Merge branch 'dev' into audioreactive-prototype 2022-08-21 09:54:33 +02:00
Blaz Kristan
ea363a8764 Minor cleanup & fix for connected(). 2022-08-21 09:51:15 +02:00
Frank
bbc8049832 The Right Thing to Do (makes GEQ look awesome)
... found that stupid commit messages get more attention ;-)

- use 22050 Hz for sampling, as it is a standard frequency. I think this is the best choise.
- redesigned the GEQ channels (fftResult[]) for 22Khz, based on channels found on old HiFi equalizer equipment. 1Kzh is now at the center; Bass/Trebble channels are using 1/4 on left/right side respectively - similar to real equalizers. Looks nice :-)

- adjusted effects that use FFT_MajorPeak so that the maximum frequency is supported.
2022-08-20 22:14:54 +02:00
Blaz Kristan
66acd60406 PWM Fan usermod UI enhancement. 2022-08-19 21:38:48 +02:00
Blaz Kristan
5927332a5f UI enhancement in PWM Fan usermod. 2022-08-19 21:25:44 +02:00
Frank
b8db47e528 AR: new freq scaling option "square root"
also looks nice. It's a compromise between log() and linear. OK enough tinkering for today :-)
2022-08-19 16:11:50 +02:00
Blaz Kristan
f7652bd2ef Fix audio sync check 2022-08-19 15:17:04 +02:00
Frank
3c57e2e2b9 AR: special gain for GEO, some bugfixes andparameter tinkering
- new feature: "Input Level" (info page) can be used as global "GEQ gain" - only when AGC is ON (was already possible when AGC=off)

- some parameter tweaking in FFT function
- hidden feature: FFT decay  is slower when setting a high "dynamics Limiter Fall time" (steps: <1000, <2000, <3000, >3000)

- FFT_MajorPeak default 1.0f (as log(0.0) is invalid)
- FX.cppp: ensure that fftResult[] is always used inside array bounds
2022-08-19 14:36:47 +02:00
Blaz Kristan
753ae51dd5 Stop & restart UDP on pause/update. 2022-08-18 20:42:58 +02:00
Frank
3e494cc551 removed broken frequency squelch, added frequency scaling options
- removed broken FFTResult "squelch" feature. It was completely broken, and caused flashes in GEQ.
- added Frequency scaling options: linear and logarithmic
- fixed a few numerical accidents in FX.cpp (bouncing_balls,  ripplepeak, freqmap, gravfreq, waterfall)
2022-08-18 19:07:37 +02:00
Blaz Kristan
67a51be9ee Merge branch 'audioreactive-prototype' into merge-audio 2022-08-17 20:14:11 +02:00
Blaz Kristan
2149bbb8ea Remove CS from global interface pins.
Fixes.
2022-08-17 19:44:32 +02:00
Frank
d92a93f1d5 AR: added dynamics limiter usermod cfg options
- On/Off controls the complete feature
- Rise Time and Fall Time are the minimum times (in milliseconds) for "volume" to go from 0% to 80% and back.
- when "On" we also use some filtering to smooth FFTResults[]. Rise and Fall Times do not affect Frequency reactive effects otherwise.
2022-08-17 13:40:54 +02:00
Frank
1336de12a0 Info Page: added status info for audioreactive
- Current sound source - including "failed to initialize"
- Current AGC or Manual Gain
- Sound Sync Status
2022-08-17 00:15:06 +02:00
Blaz Kristan
0f78bd3785 PWM fan manual speed override. 2022-08-16 20:57:24 +02:00
Frank
1a2701561b AR: bugfix for audio sync receive, and a few robustness improvements
* Header checking for sound sync receiver: removed wrong "!"
* make sure all member vars have initial values
* some robustness improvements in case of receiving bad UDP data.
2022-08-16 12:02:22 +02:00
Frank
91fe80334b Merge remote-tracking branch 'origin/segment-api' into audioreactive-prototype 2022-08-15 21:33:30 +02:00
Blaz Kristan
7125d19af1 Bugfix for saving usermod settings.
Modification of global interface pin allocation.
Code relocation in 4LD.
2022-08-15 20:23:47 +02:00
Frank
873e41dcfb AR: change smoothing of FFTResult
FFTResult smoothing changed; rising edges will be very quick, falling down is slower.
2022-08-15 14:28:51 +02:00
Frank
5a4713950c improved ADCsample processing (from SR WLED)
improved ADCsample processing,  including replacement of "rogue" samples from other channels (this happens at least once in 5 seconds !!).

It compiles, don't ship it yet - needs more testing.
2022-08-14 16:17:34 +02:00
Frank
c6691564a5 removing dead code from getSamples() 2022-08-14 14:47:03 +02:00
Frank
8acb44b202 small improvement for limitSampleDynamics
support the case when only attackTime XOR decayTime is defined
2022-08-14 14:38:27 +02:00