Introduction

Documentation Status Discord Build Status Code Style: Black

DMX512 lighting protocol receiver on the RP2040

Usage Example

"Receive DMX"

import time
import board
from dmx_receiver import DmxReceiver

DMX_PIN = board.D1

dmx_receiver = DmxReceiver(pin=DMX_PIN, slot=0)

for data in dmx_receiver:
    if data is not None:
        print(bytes(data))

Schematic

Example:

>         ┌─────┐            ╔═════════════════╗
>    ╔════╡USB-C╞════╗       ║                 ║
>    ║    └─────┘    ║  ┌────╫(6) VCC          ║       ╔══════════════╗
>    ║            3V ╫──┘    ║               A ╫───────╫─< (3) Data + ║
>    ║               ║    NC─╫(2) TXD          ║  ┌────╫─< (2) Data - ║
>    ║               ║       ║               B ╫──┘ ┌──╫─< (1) Common ║
>    ║               ║   ┌───╫(4) RXD          ║    │  ╚══════════════╝
>    ║         RX/D1 ╫───┘   ║    __         Y ╫ NC │   XLR Connector
>    ║               ║    ┌──╫(1) RE           ║    │   Male
>    ║               ║    │  ║               Z ╫ NC │
>    ║               ║    ├──╫(4) DE           ║    │
>    ║           GND ╫────┤  ║          ISOGND ╫────┘
>    ║               ║    └──╫(5) GND          ║
>    ║               ║       ║                 ║
>    ╚═══════════════╝       ╚═════════════════╝
>     Microcontroller         RS485 Line Driver
>     Adafruit KB2040         Digilent PmodR485

Significant DMX wiring requirements are necessarily out of scope in this document. Consult a qualified local expert.

REQUIREMENTS

Hardware:

Software and Dependencies:

  • Adafruit CircuitPython

  • This library, dmx_transmitter, especially these files:

    * dmx_transmitter.mpy
    * payload_USITT_DMX512_A.mpy
    

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Installing to a Connected CircuitPython Device with Circup

Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:

pip3 install circup

With circup installed and your CircuitPython device connected use the following command to install:

circup install dmx_receiver

Or the following command to update an existing version:

circup update

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Table of Contents

Examples

Glossary

Indices and tables