-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
DMX Output - Runtime Config & replace SparkFunDMX with esp_dmx #5433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
netmindz
wants to merge
36
commits into
wled:main
Choose a base branch
from
netmindz:dmx-output-esp_dmx
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+131
−316
Draft
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
c0d662a
Swap DMX output to also use esp_dmx
netmindz 37732ca
Temp enable DMX Output in all builds
netmindz 96d4489
WLED_GLOBAL needed for dmx field to prevent linker errors
netmindz 84ce66f
ass ifdef for 8266
netmindz d40f0f6
Set output pin during init
netmindz 7d3a673
Remove lazy init
netmindz d336b97
set output pin
netmindz 576b628
Allow runtime config of DMX output pin
netmindz 2f874cf
remove redundant code
netmindz 034e4f5
register pin with PinManager
netmindz 834c285
default output pin to -1
netmindz 22aff94
move dmx definition back to original location
netmindz 585d174
minor cleanup
netmindz 7a910c8
minor cleanup, code style
netmindz 5cdca58
Fix naming
netmindz 48168ed
write data
netmindz 93ef454
Swap DMX output to also use esp_dmx
netmindz cd08d6f
Temp enable DMX Output in all builds
netmindz c8ff292
WLED_GLOBAL needed for dmx field to prevent linker errors
netmindz b11c7f7
ass ifdef for 8266
netmindz d5061ed
Set output pin during init
netmindz 1ccef16
Remove lazy init
netmindz 4a60207
set output pin
netmindz 3b92b2d
Allow runtime config of DMX output pin
netmindz ec64355
remove redundant code
netmindz 02274e1
register pin with PinManager
netmindz b8fcb1c
default output pin to -1
netmindz 306ba83
move dmx definition back to original location
netmindz f5522e6
minor cleanup
netmindz 38330b5
minor cleanup, code style
netmindz daa2223
Fix naming
netmindz e28774d
write data
netmindz c20f59d
DMXInput: try to assign pins before UART port and default back to 1 i…
netmindz ea3aba9
DMXInput: No need to swap default pin for LED when DMX not hard-coded
netmindz ab632e9
DMXInput: Move allocation of pin to initDMXOutput
netmindz cf1f236
Merge remote-tracking branch 'netmindz/dmx-output-esp_dmx' into dmx-o…
netmindz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // | ||
| // Created by will on 1/10/26. | ||
| // | ||
|
|
||
| #ifndef DMX_OUTPUT_H | ||
| #define DMX_OUTPUT_H | ||
|
|
||
| #if defined(ESP8266) | ||
| #include "src/dependencies/dmx/ESPDMX.h" | ||
| #else | ||
| #include <esp_dmx.h> | ||
| /** | ||
| * Support for DMX Output via serial (e.g. max485) on ESP32 | ||
| * ESP32 Library from: | ||
| * https://github.com/someweisguy/esp_dmx | ||
| */ | ||
| class DMXOutput | ||
| { | ||
| public: | ||
| void init(uint8_t outputPin); | ||
| void write(uint8_t channel, uint8_t value); | ||
| void update(); | ||
| private: | ||
| byte dmxdata[DMX_PACKET_SIZE]; | ||
| /* Next, lets decide which DMX port to use. The ESP32 has either 2 or 3 ports. | ||
| Port 0 is typically used to transmit serial data back to your Serial Monitor, | ||
| so we shouldn't use that port. Lets use port 1! */ | ||
| dmx_port_t dmxPort = 1; | ||
| }; | ||
| #endif | ||
|
|
||
|
|
||
| #endif //DMX_OUTPUT_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,11 +43,12 @@ enum struct PinOwner : uint8_t { | |
| Relay = 0x87, // 'Rly' == Relay pin from configuration | ||
| SPI_RAM = 0x88, // 'SpiR' == SPI RAM | ||
| DebugOut = 0x89, // 'Dbg' == debug output always IO1 | ||
| DMX = 0x8A, // 'DMX' == hard-coded to IO2 | ||
| DMX = 0x8A, // 'DMX' == DMX output via serial | ||
| HW_I2C = 0x8B, // 'I2C' == hardware I2C pins (4&5 on ESP8266, 21&22 on ESP32) | ||
| HW_SPI = 0x8C, // 'SPI' == hardware (V)SPI pins (13,14&15 on ESP8266, 5,18&23 on ESP32) | ||
| DMX_INPUT = 0x8D, // 'DMX_INPUT' == DMX input via serial | ||
| HUB75 = 0x8E, // 'Hub75' == Hub75 driver | ||
| DMX_OUTPUT = 0x8F, // 'DMX_OUTPUT' == DMX output via serial | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Todo: clean up |
||
| // Use UserMod IDs from const.h here | ||
| UM_Unspecified = USERMOD_ID_UNSPECIFIED, // 0x01 | ||
| UM_Example = USERMOD_ID_EXAMPLE, // 0x02 // Usermod "usermod_v2_example.h" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: remove before merge