I'd like to use DMXSimple or similar library on RP2040 (Arduino-Pico - Thanks @earlephilhower for that project) Eventually with WiFi or BLE mesh, but one step at a time.
HI Gavin,
I suggest you use the Pico-DMX library, which is designed for RaspberryPi-Pico
with Arduino mbed_rp2040 core
Wow that is perfect Khoi, the other libs you suggested I had already looked at and didn't have PICO support. This one just didn't show up for me in Library Manager, I guess because I was searching RP2040 DMX, not PICO DMX. Doh! Glad you found it, I was about to attempt modifying the bit banged DmxSerialRecv. Phew!
Glad you found it good for your project.
Many impressive features compared to other DMX-related libraries. such as
The RaspberryPi Pico provides an exciting new addition to the market on low-cost easy-to-use microcontroller board. The Pico has plenty of features making it particularly interesting for lighting control hackers:
- Lighting control software can potentially become quite large. A large chunk of flash is required to run networked protocols such as Art-Net and sACN (ANSI e1.31). The Pico has a whopping 2MB of flash at disposal, which leaves plenty of room for your networked DMX software.
- Storing DMX universes requires a lot of RAM (>512B for each full DMX frame). With other microcontrollers, RAM is a scarce resource and manipulating DMX universes can quickly consume the entire RAM of the microcontroller. The Pico has a solid 264kB of RAM, leaving plenty of room for dmx frame manipulation.
- Libraries for sending DMX on other microcontrollers tend to rely on either bit-banging a GPIO or a hack on a hardware UART to allow the UART to assert a sufficiently long BREAK and MAB at the beginning of each transfer. Bit-banging consumes a processor core for the duration of a transfer and is extremely sensitive to interrupts. Using a hardware UART is less computationally intensive, but most low-cost microcontrollers only have 1 or 2 hardware UARTs, limiting the number of parallel universes one can transmit or receive. The Programmable IO (PIO) modules of the Pico gives the possibility to create what is basically hardware support for custom IO protocols (such as DMX). The Pico features 2 PIO modules with 4 State Machines each, making it possible to input or output up to 8 universes in parallel. Thats more universes than you can shake a proverbial stick at.
- As if the PIO wasn't impressive enough, the Pico has a powerful 10 channel DMA controller. In conjunction with the PIO, the DMA makes it possible to input or output entire DMX universes with only a handful of instructions.
- The Pico has a rather odd combination of 2 ARM Cortex M0+ cores running at speeds up to 133MHz. The dual core architecture could provide a huge benefit in processing DMX universes as computationally demanding data processing can be offloaded on the second core.
Exactly right. Just what I would have designed, but didn't have time to build.
I'm hoping to give back to the community once I have a project integrating BLE mesh with this and the up to 16bit PWM (your contribution, thanks again). I'm getting old and slow so probably someone will beat me to it. LOL
I just created the PR Add support to arduino-pico and mbed_nano core #24 to Pico-DMX library
- Add support to Earle Philhower's arduino-pico core
- Add support to
Nano_RP2040_Connect
usingmbed_nano
core
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.