This software is a bridge between a DMX512 bus and an Lego EV3 Mindstorms brick.
In terms of hardware, it uses a SparkFun ESP32 DMX to LED Shield and a SparkFun Thing Plus - ESP32.
It works as follows:
- Registers on the DMX bus as a receiver. The channel is hardcoded in the source code.
- If it detects a value above or below a certain threshold (also hardcode) it writes a HIGH or LOW value to an output pin D0 of the SparkFun DMX shield.
- All detected transitions are also written to serial port for debugging purposes.
- Normally, between the DMX shield and the EV3 I put a small resistor circuit so that the bridge is seen as a touch sensor. But it doesn't need to be this way.
- The internal RGB LED of the ESP32 is used to show status. RED means that no data is being read from the DMX bus. Blicking between GREEN, BLUE and RED means that data is being produced.
- Also, the BLUE LED of the ESP32 is used to show if we are writing a zero or one to the D0 line of the shield.
Here's an image of the entire aparatus:
You can see it in action here:
ClockVideo.mp4
Please also refer to this project: EV3 Clock Controller