Closed davy39 closed 4 months ago
Hi @davy39,
Thank you for your question.
Indeed the library requires the rp2pio. I’d used the PIO to avoid any bit banging. Honestly, I’m not familiar with BLE or Pulseio, but it looks like Pulseio isn’t particularly suitable for DMX512
In case you’d hadn’t a chance to look into the DMX512 standard, it’s a 250 kbit/sec serial data stream, but unlike more sophisticated serial protocols, each packet is framed by a longer break, instead using framing bytes.
One possibility is to use a UART. But, I don’t know how to send the break. If the UART can do it, great. Or maybe use a GPIO pin and some logic. The DMX512 standard is pretty permissive on the length of the break, as long as it’s 92 microseconds or longer. If you experiment with a UART keep in mind that DMX has TWO stop bits per byte, but your equipment may not care.
Another possibility is to use this product that Adafruit sells: https://learn.adafruit.com/quickstart-raspberry-pi-rp2040-with-ble-and-circuitpython/overview it looks like this product allows BLE to be connected to a RP2040 microcontroller.
Let me know if this helps.
Dana
P.S. I’m interested in knowing more about your use case. Please tell me more about it.
Hi, Thanks for your answer. I would like to build a wireless dmx controller that use BLE to send DMX bytes to a receiver that transmit them as a DMX signal. As soon as I get my MAX485 chip, I'll try to use UART to send DMX signal.
For now, my only way to send a break is digitalio. However, switching form digitalio to UART is a quite long process, so MAB is > 200µs !
I'll see if my dmx equipment care about such a long MAB...
Hello, Finally I didn't try to use uart, but SPI instead. Thanks for your advices. You can find my very basic, but working code here. Cheers.
@davy39 That's a really clever solution. Bravo!
Hello, Many thanks for your library !
I would like to use it with BLE with an ESP32, but seems to rely on rp2pio.
Would you know how to modify it in order to use it with broader range of boards, maybe using pulseio ?