R-3X (DJ R3X) Body Logics

Estimated reading time: 6 min

DJ R3X Logic Lights (RX Series) Logic Lights.

The Logic Lights set consists of 3 circuit boards and is controlled by an ESP32 C3 Mini (older version uses Arduino Nano – Sketch 2.5 Nano).

The Arduino ESP (Nano) sits directly on the right logic board.
The board can be controlled serially or with I2C and has 3 more full output pins with 5V, signal and GND.
Furthermore, other pins are brought out.

Pictures below are the “older” Nano boards:

Available at shop.printed-droid.com

Software Guides


DJ REX ESP32 C3 Mini v2.1 Guide

This guide provides full setup and operational instructions for the advanced ESP32-C3 Mini version of the DJ R3X body logic. This version is a significant upgrade over the Nano project, offering a richer feature set, greater stability, and more customization options.


Part 1: Hardware Requirements

  • Main Controller: ESP32-C3 Mini
  • Body LED Panels: 3x panels, each with 20 WS2812B LEDs
  • Eyes & Mouth LEDs: 2x Eye LEDs and 80x Mouth LEDs (WS2812B type)
  • Microphone: I2S MEMS Microphone (e.g., INMP441)
  • Status LED: A standard 3mm or 5mm blue LED

Part 2: Wiring Diagram

Connect the components to the ESP32-C3 Mini pins as defined in the project configuration.

ComponentESP32-C3 Mini PinDescription
Right Body PanelIO3Data In for the right-side LEDs
Middle Body PanelIO4Data In for the middle LEDs
Left Body PanelIO5Data In for the left-side LEDs
Eyes & Mouth LEDsIO6Data In for both Eyes and Mouth LEDs (chained)
MicrophoneIO1Analog audio input
Status LEDIO8Feedback LED

Part 3: Software Setup

  1. Arduino IDE: Ensure you have the Arduino IDE installed with support for ESP32 boards.
  2. Libraries: Install the FastLED library, version 3.9.0 up to 3.9.6. Newer versions may cause issues. The Preferences.h library is included with the ESP32 core.
  3. Upload Code: Upload the complete code for “DJ REX ESP32 C3 Mini v2.1” to your ESP32-C3 Mini.
  4. First Boot: The system runs a startup sequence, and default settings are loaded from flash memory.

Part 4: Features, Usage & Troubleshooting

Demo Mode Features

The advanced demo mode automatically cycles through body patterns, mouth patterns, and eye modes.

  • Smart Pattern Cycling: Body patterns with color options will cycle through several colors before moving to the next pattern.
  • Full Animation: The demo also cycles through different mouth animations and eye color modes, creating a dynamic showcase.
  • State Preservation: When you turn demo mode off, the system automatically reverts to the pattern that was active before demo mode was started.

Usage Examples

  • Quick Start
    • help: Show all commands
    • demo on: Start the full demo mode
    • demotime 20: Change to 20 seconds per major step
  • Advanced Custom Setup
    • S 16: Set to “Custom Block Sequence” pattern
    • eyemode 2: Set eyes to alternate between colors
    • eyecolor 3: Set primary eye color to Warm White
    • eyecolor2 2: Set secondary eye color to Blue
    • mouth 7: Set mouth pattern to “Pulse”
    • mouthsplit 1: Split mouth color Left/Right
    • mouthcolor 2 0: Set mouth colors to Blue and Red
    • save: Save the full configuration
  • Audio Reactive Setup
    • S 15: Set body to “Audio VU Meter”
    • mouth 11: Set mouth to “Audio VU Meter”
    • audiomode 4: Set everything to be audio reactive
    • audiosens 6: Set audio sensitivity to 6/10
    • autogain on: Enable automatic gain control
    • save: Save settings

Troubleshooting

  • LEDs Not Responding:
    • Check the Status LED. A very fast blinking light indicates a system error.
    • Verify your serial monitor connection is set to 115200 baud.
    • Double-check all wiring against the pin diagram.
  • Settings Not Saving:
    • Use the save command after making changes.
    • Use the status command to verify that your settings have been accepted.
    • If issues persist, use reset to clear the flash memory and start fresh.
  • Audio Sync Not Working:
    • Use the audiomode command to ensure the correct parts are set to listen.
    • Check the microphone connection to pin IO1.
    • Adjust sensitivity with audiosens or audiothreshold.

Part 5: Full Serial Command Reference

Body Pattern Commands

  • S <0-16>: Set pattern.
  • next / prev: Navigate patterns.

Eye Commands

  • eyecolor <0-19>: Set primary eye color.
  • eyecolor2 <0-19>: Set secondary eye color.
  • eyemode <0-2>: Set eye mode (0=Single, 1=Dual, 2=Alternating).

Eye Flicker Commands

  • eyeflicker on: Enable eye flickering.
  • eyeflicker off: Disable eye flickering (static eyes).
  • eyeflicker settings: Show all eye flicker configuration.
  • eyeflickertime <min> <max>: Set flicker timing in milliseconds (50-5000ms).
  • eyestaticbright <0-255>: Set brightness for static eyes (0-255).
  • test: Debug command for current eye settings.

Mouth Commands

  • mouth <0-11>: Set mouth pattern.
  • mouthcolor <0-19>: Set primary mouth color.
  • mouthcolor2 <0-19>: Set secondary mouth color.
  • mouthsplit <0-4>: Set mouth split mode.
  • mouthbrightness <1-255>: Set mouth brightness.
  • mouthenable on/off: Enable/disable mouth.
  • talkspeed <1-10>: Set talk animation speed.
  • smilewidth <2-10>: Set smile width.
  • wavespeed <1-10>: Set wave animation speed.
  • pulsespeed <1-10>: Set pulse animation speed.

Audio Commands

  • audiomode <0-4>: Set audio routing mode (0=Off, 1=Mouth Only, 2=Body Sides, 3=Body All, 4=Everything).
  • audiosens <1-10>: Set audio sensitivity.
  • audiothreshold <50-500>: Set threshold manually.
  • autogain on/off: Enable/disable auto gain.

Random Blocks Configuration

  • blockcolor <0-8> <0-19>: Set block color.
  • blockrate <1-255>: Set block blink speed.
  • sidecolors <0-19> <0-19> <0-19>: Set side colors.
  • sidemode <0-4>: Set side color mode.
  • siderate <1-255>: Set side blink speed.
  • showblocks: Show block assignments.

Pattern Color Commands

  • color <0-19>: Solid color.
  • solidmode <0-1>: Solid mode.
  • flashcolor <0-19>: Flash color.
  • flashspeed <1-10>: Flash speed.
  • shortcolor <0-19>: Short circuit color.
  • knightcolor <0-19>: Knight Rider color.
  • breathcolor <0-19>: Breathing color.
  • matrixcolor <0-19>: Matrix rain color.
  • strobecolor <0-19>: Strobe color.
  • confetti <0-19> <0-19>: Confetti colors.

Demo Mode

  • demo on/off: Toggle demo mode.
  • demotime <5-300>: Set demo interval.

General Settings

  • brightness <1-255>: Global brightness.
  • eyebrightness <50-200>: Eye brightness %.
  • bodybrightness <50-200>: Body brightness %.
  • mouthouter <50-200>: Mouth outer LED boost %.
  • mouthinner <50-200>: Mouth inner LED boost %.
  • speed <1-255>: Effect speed.
  • fade <1-50>: Fade speed.
  • sidetime <min> <max>: Side LED timing.
  • blocktime <min> <max>: Block timing.

System Commands

  • save: Save to flash.
  • load: Load from flash.
  • reset: Factory reset.
  • status: Show settings.
  • help: This help.
  • saveuser <1-3>: Save current setup as user preset.
  • loaduser <1-3>: Load user preset.
  • deleteuser <1-3>: Delete user preset.
  • listpresets: Show saved presets.

Colors

  • color 0 = Red
  • color 1 = Green
  • color 2 = Blue
  • color 3 = Warm White
  • color 4 = Yellow
  • color 5 = Cyan
  • color 6 = Magenta
  • color 7 = Orange
  • color 8 = Purple
  • color 9 = Pink
  • color 10 = Black
  • color 11 = Matrix Green
  • color 12 = Ice Blue
  • color 13 = UV Purple
  • color 14 = Amber
  • color 15 = Cool White
  • color 16 = Lime Green
  • color 17 = Teal
  • color 18 = Pure White
  • color 19 = Blue White


DJ R3X – Arduino Nano v2.5.1 Guide

This guide covers the setup and operation for the DJ R3X body logic running on an Arduino Nano. This version (v2.6) focuses on providing deep customization for the “Random Blocks” pattern, allowing for precise control over the color and behavior of every element.


Part 1: Hardware Requirements

  • Main Controller: Arduino Nano
  • Body LED Panels: 3x panels, each with 20 WS2811 LEDs
  • Eyes LEDs: 2x WS2811 LEDs
  • Microphone: A standard 5V analog microphone module.

Part 2: Wiring Diagram

Connect the components to the Arduino Nano pins as defined in the source code.

ComponentArduino Nano PinDescription
Right Body PanelD2Data In for Panel A
Middle Body PanelD3Data In for Panel B
Left Body PanelD4Data In for Panel C
Eyes LEDsD7Data In for the Eye LEDs
MicrophoneA5Analog audio input (MIC_PIN 5)

Part 3: Software Setup

  1. Arduino IDE: Ensure you have the Arduino IDE installed.
  2. Libraries: Install the FastLED library, version 3.9.0 up to 3.9.6. The EEPROM.h library is included with the standard Arduino core.
  3. Upload Code: Upload the DJ_Rex_Nano_v2.5.1.ino sketch to your Arduino Nano.
  4. First Boot: On first boot, default settings are written to the EEPROM. Subsequent changes are saved automatically.

Part 4: Features, Usage & Troubleshooting

Demo Mode Features

Demo mode automatically cycles through all patterns.

  • Smart Cycling: It intelligently cycles through all 10 colors for patterns that support it (Solid Color, Short Circuit, Confetti, Solid Flash) before moving to the next pattern.
  • Configurable Timing: You can set how long each step lasts (5-300 seconds) using the demotime command.
  • Auto-Start: If you save the settings while demo mode is on, it will automatically start on the next boot.
Demo Sequence Example (demotime 10)
  1. Solid Color: Cycles through all 10 colors (Red, Green, Blue…).
  2. Short Circuit: Cycles through all 10 colors.
  3. Confetti: Cycles through color combinations.
  4. Rainbow: Runs for 10 seconds.
  5. …and so on for all other patterns.
  6. Solid Flash: Cycles through all 10 colors.
  7. The sequence then repeats, skipping “LEDs Off”.

Usage Examples

  • Quick Start
    • help: Show all commands
    • demo on: Start demo mode
    • demotime 15: Change to 15 seconds per pattern
  • Custom “Random Blocks” Setup
    • S 1: Set to “Random Blocks” pattern
    • blockcolor 0 4: Set Right-Block1 to Yellow (Color 4)
    • blockcolor 3 2: Set Middle-Block1 to Blue (Color 2)
    • sidecolors 4 2 3: Set side LEDs to use Yellow, Blue, and White
    • sidemode 0: Set side LEDs to pick randomly from the 3 colors
    • save: Save the configuration
  • Audio Reactive Setup
    • S 9: Set to “Audio Sync” pattern
    • audiothreshold 150: Adjust sensitivity (higher is less sensitive)
    • brightness 200: Increase brightness
    • save: Save settings

Troubleshooting

  • LEDs Not Responding:
    • Verify your serial monitor connection is set to 115200 baud.
    • Check all wiring, especially the data pins (D2, D3, D4, D7).
    • Ensure your power supply is sufficient for all LEDs.
  • Settings Not Saving:
    • Use the save command after making changes.
    • Use the status command to verify that your settings have been accepted.
    • If issues persist, use the reset command to clear the EEPROM and start with fresh defaults.
  • Audio Sync Not Working:
    • Check the microphone connection to pin A5.
    • Use the audiothreshold command to adjust sensitivity. Start with a value around 150 and go up or down.

Part 5: Full Serial Command Reference

Pattern Commands

  • S <0-10>: Set pattern.
  • next: Next pattern.
  • prev: Previous pattern.

Random Blocks Configuration

  • blockcolor <0-8> <0-9>: Set specific block color.
  • blockrate <1-255>: Set block blink speed.
  • sidecolors <0-9> <0-9> <0-9>: Set 3 side LED colors.
  • sidemode <0-4>: Set side color mode (0=random, 1=cycle, 2-4=specific).
  • siderate <1-255>: Set side LED blink speed.
  • showblocks: Show current block color assignments.

Flash & Short Circuit Patterns

  • flashcolor <0-9>: Set flash color.
  • flashspeed <1-10>: Set flash speed.
  • shortcolor <0-9>: Set short circuit spark color.

Demo Mode

  • demo on / demo off: Start or stop demo mode.
  • demotime <5-300>: Set demo time in seconds.

Color Commands

  • color <0-10>: Set solid color (10=random).
  • solidmode <0-1>: Set solid mode (0=static, 1=blink/fade).
  • confetti <0-9> <0-9>: Set two colors for confetti pattern.
  • eyecolor <0-9>: Set eye color.

Brightness & Speed

  • brightness <1-255>: Set global brightness.
  • speed <1-255>: Set effect speed.
  • fade <1-50>: Set fade speed.

Timing & Audio

  • sidetime <min> <max>: Set side LED timing in ms.
  • blocktime <min> <max>: Set block timing in ms.
  • audiothreshold <50-500>: Set audio sensitivity.

System Commands

  • save: Save settings to EEPROM.
  • load: Load settings from EEPROM.
  • reset: Reset to default settings.
  • status: Show current settings.
  • help: Show this help menu.



Tags:
Was this article helpful?
Dislike 0 2 of 2 found this article helpful.
Views: 948
Previous: RX-Series (DJ-R3X)