Skip to content

Final Project Tracking Page

Record the progress of the final project each week, and then summarize the work related to the final project for the following weeks.


Week1 Final project sketch

This is a sketch of my first final project idea. It’s to build a device to test stage lighting signal systems. What I’ll actually build is a tester with a monitor function that checks the DMX signal status (pictured in the middle), and it will display the signal status of four universes at once. If I have time, I’d also like to build a DMX signal output device to check its operation, and a DMX input device that can receive DMX signals and perform some action.

Reason

Why do I need it? The reason is that my work often involves checking DMX. Is the signal line connected? Is the DMX signal to live or not to live? That’s the question.

Furthermore, the days of checking only 512 channels and one universe are over. The controller can output more than 2 universes simultaneously. No matter how many oscilloscopes I have, it’s never enough.

Initial plan

First, I’ll build a controller that outputs a minimal DMX signal and various simple devices that operate using DMX input (such as an RGB LED strip or a servo-driven projector shutter). Next, I’ll build a monitor to monitor the movement of the DMX 512ch x 4 universe signal, which is my ultimate goal. If I have time, I’d like to build a larger controller or a DMX-controlled device. Here’s a list of what I make:

  • 4universe DMX signal monitoring tester

  • DMX signal in and out module

  • DMX signal monitoring module
  • Monitor Controle module
  • case assemble

  • 4universe DMX conecting cable

Extra

  • DMX signal out controller
  • DMX signal input controlled device

Week2 Computer Aided design

This week I designed a slider case in Fusion.

Although I couldn’t finish it this week, I designed the cases for the NeoPixel DMX controller and the DMX monitor in the following weeks.

The monitor case was originally planned to have four inputs, but due to time constraints during the design process, it was changed to a single-input design in May.

Week3 Computer controlled cutting

I wasn’t able to make any progress on the final project this week.

In the following weeks, I used a laser cutter to create the case for the DMX monitor device and the base plates for two other devices from 2.5mm MDF.

Then I spray-painted them black.

Week4 Embedded Programming

This week, I learned how to set up the environment for programming Xiao using the Arduino IDE.

After this week, I was scheduled to set up the environment for programming the ESP32 used as a DMX monitor device.

Week5 3D Scanning and printing

This week I was learning how to 3D print, but I didn’t make any progress on my final project.

In the following weeks, I 3D printed the slider case, the NeoPixel controller case, and the MDF connectors for the DMX monitor case.

Week6 Electronics design

I had intended to use the board I designed this week somewhere in the final project.

heroshot

However, due to its large size and the need to incorporate DMX functionality, I ended up using a redesigned board from a later week.

Week8 Electronics Production

This week I learned how to make a PCB.

As mentioned earlier, I didn’t use the board I made at that time; I made a new one later.

Week9 Input Devices

This week, I worked on connecting the slide potentiometer to Xiao and programming it.

It’s still running as a standalone unit and hasn’t been converted to a DMX signal yet.

Oscilloscope value when the slider is lowered.

The program is available on each week’s project page, so please check there.

Week10 Output Devices

This week, I learned how to operate NeoPixels. I found out that a 5V 10A power supply is needed to power 144 LEDs. I haven’t been able to control them with DMX yet, but they are lighting up in rainbow colors with the program on Xiao.

The program is available on each week’s project page, so please check there.

Week11 Networking and Communications

This week, I was able to control input and output devices using basic DMX communication with Xiao.

I found that when using the RP2040, it’s best to use the picoDMX library, and when using the ESP32, it’s best to use the espDMX library.

The program is available on each week’s project page, so please check there.

what is DMX512 signal

This signal is characterized by a long break (BREAK) and a mark-after-break (MAB) signal. The BREAK must be at least 88 μs long, and the MAB must be at least 8 μs (previously it was 4 μs). After the break, 513 data slots are sent, each 8 bits long and containing data ranging from 0 to 255.

That is a RS485 segnal. transmitted over a differential pair

Week13 Mid Term Review

This week, I created a flowchart of the entire system, system diagrams for each device, a table listing the remaining tasks for the final project at the midterm review stage, and a Gantt chart based on these.

DMX Communication Flowchart

graph TD
    A[DMX Output Device] -- DMX Signal --> B[DMX Monitoring 4]
    B -- DMX Signal --> C[DMX Input Device]

Each system diagram

Movement input & DMX output device

graph TD
    subgraph Device1 [DMX Output Device]
        %% Processing Section
        XIAO[Seeed Studio XIAO RP2040]

        %% Interface Section
        subgraph Interface [Hardware Interface]
            SF[Slide Fader] -- Analog Signal --> XIAO
            CKS[Cherry Key Switches] -- Digital Signal --> XIAO
            RE[Rotary Encoder] -- Pulse Signal --> XIAO
            MAX485[MAX485 Transceiver]
        end

        %% Connection to Processing
        XIAO -- UART Serial --> MAX485

        %% Output Port inside Device1 but outside Interface
        Out([DMX Output Port])
        MAX485 -- DMX Signal --> Out
    end

    %% Styling
    style XIAO fill:#f96,stroke:#333,stroke-width:2px
    style MAX485 fill:#bbf,stroke:#333,stroke-width:2px

DMX signal monitoring device

graph TD
    subgraph Device_Monitor [DMX Monitoring 4]
        %% Ports
        In([DMX Input Port])
        Thru([DMX Thru Port])

        %% Interface Section
        subgraph Interface [Hardware Interface]
            MAX485[MAX485 Transceiver]
            Pico[Raspberry Pi Pico RP2040]
            Graphics[Bar Graph Engine]
            Monitor[TFT/LCD Monitor]
        end

        %% Connection Flow
        In -- DMX Signal --> MAX485
        MAX485 -- DMX Signal --> Thru
        MAX485 -- UART Serial --> Pico

        %% Processing & Display
        Pico -- "Process Ch 1-512" --> Graphics
        Graphics -- Video Signal --> Monitor
    end

    %% Styling
    style Pico fill:#f96,stroke:#333,stroke-width:2px
    style MAX485 fill:#bbf,stroke:#333,stroke-width:2px
    style Monitor fill:#dfd,stroke:#333,stroke-width:2px

DMX input & Movement or lighting output device

graph TD
    subgraph Device_LED [DMX Input Device: 1 NeoPixel Strip]
        %% Input Port inside Device_LED
        In([DMX Input Port])

        %% Revised Interface Section
        subgraph Interface [Hardware Interface]
            MAX485[MAX485 Receiver]
            XIAO[Seeed Studio XIAO RP2040]
            Mapping[RGB Pixel Control Logic]
        end

        In -- DMX Signal --> MAX485
        MAX485 -- UART Serial --> XIAO
        XIAO -- "Map DMX Ch 1-432" --> Mapping

        %% Output Section
        Mapping -- One-Wire Data --> NP[NeoPixel LED Strip]

        subgraph Detail [LED Details]
            NP --- L1[LED 1: Ch 1-3]
            NP --- L2[LED 2: Ch 4-6]
            NP --- L3[LED 144: Ch 430-432]
        end
    end

    %% Styling
    style XIAO fill:#f96,stroke:#333,stroke-width:2px
    style MAX485 fill:#bbf,stroke:#333,stroke-width:2px
    style NP fill:#dfd,stroke:#333,stroke-width:2px

Week14 Moulding and Casting

This week, I made a mold for creating the silicone feet for the monitor device.

In the following week, I colored light blue silicone with about 10% Indian ink, which is used in Japanese calligraphy, and created black silicone leg parts.

They’ve finished testing and are now casting.

When it solidified and was taken out

Week16 System Integration

This week, we completed the package for the DMX control device.

Schematic

PCB

Soldering

Front side

Rear side


Others

DMX input NeoPixel LED Device

Wiring with NeoPixel

I used a Canare cable called 4E6S.

Strip about 1 cm of insulation, solder together the shield and two strands of the same colored wire, making a total of three strands, and bundle them together.

I soldered the ground wire to the shield, the 5V wire to blue, and the data input wire to white.

Place heat shrink tubing over the wiring. I reinforced the area around the wiring with hot melt glue.

The wiring would easily come loose if left as is, so I reinforced it further with transparent heat-shrink tubing.

As the material shrinks, the hot melt glue melts and neatly fills the gaps. This photo shows the result after the extruded glue has cooled and been removed.

Attach double-sided tape to the tape and then insert it into the molding.


EL connector

I decided to use a JST EL connector for the other end of the wiring. This connector can handle currents up to 10A, and I had both the necessary 2-pin and 3-pin versions in stock, so I decided to use it.

Using specialized crimping pliers will result in a cleaner crimp.

Crimp the wiring for the 8A power supply.

Strip 3mm of wire

Insert the contact lens.

Crimp with a die of the appropriate size.

Successful photo

Press the other side in the same way.

Insert the crimped contacts into the housing.

Insert it all the way in

If the contact’s return portion is properly inserted, the connector will not come loose even if you pull on it.

Completed signal and power mixed harness

Test the circuit

Verification circuit for SPI converter that uses a DMX signal to light up a Neo Pixel.


System Integration

The electrical tests seemed to go well, so I’ll proceed with assembling it into the box. All the ingredients are shown in the following photo.

Xiao Board top

Xiao Board bottom

5V power supply module for boards

XLR 5-pin, front side

XLR 5pin, reverse side

Signal and power mixed harness

Case and bottom cover

Insert the EL terminals into the case from the inside and secure the harness.

The CAD design ensures that the connector does not protrude from the surface.

I installed an XLR connector.

I realized midway through that if I didn’t attach the power connector first, I wouldn’t be able to tighten the screws later, so I attached the power connector.

Attach the Xiao board to the base plate.

I added washers because the MDF was not strong enough.

To prevent the soldered component leads from interfering with each other, I inserted a spacer about 3 mm in diameter to raise the circuit board.

Insert a spring washer between the nut and the nut to prevent the nut from loosening and falling off.

The attached photo shows no interference with the soldered bottom surface.

Install the programmed Xiao.

The program that was written is this

#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include "DmxInput.h"

// --- Configuration ---
#define DMX_RX_PIN 0     // DMX input pin (GP0)
#define NEOPIXEL_PIN 26  // Neo Pixel data pin (GP26)
#define NUM_LEDS 170     // Neo Pixel LED pixels
#define START_CHANNEL 1  // DMX start adres
#define NUM_CHANNELS 510 // 170pixel * 3ch (R,G,B) = 510ch

DmxInput dmxInput;
Adafruit_NeoPixel strip(NUM_LEDS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);

// Buffer for storing incoming DMX data
volatile uint8_t buffer[DMXINPUT_BUFFER_SIZE(START_CHANNEL, NUM_CHANNELS)];

void setup() {
    strip.begin();
    strip.show(); // Turn off all LEDs initially
    dmxInput.begin(DMX_RX_PIN, START_CHANNEL, NUM_CHANNELS);
}

void loop() {
    // Wait for DMX packet
    dmxInput.read(buffer);

    for (int i = 0; i < NUM_LEDS; i++) {
        // Map buffer to RGB
        uint8_t r = buffer[i * 3 + 1];
        uint8_t g = buffer[i * 3 + 2];
        uint8_t b = buffer[i * 3 + 3];
        // // Push colors to LED strip
        strip.setPixelColor(i, strip.Color(r, g, b));
    }
    strip.show();
}

Connect the connectors and secure the harness with zip ties.

Secure the bottom plate with screws.

Completed


DMX monitoring device

Programming

I started working on this monitor in mid-May. First, I decided to start by disassembling a toy and checking the functionality of the monitor I extracted. The one that worked was the Freenove esp32-wroom32e.

The test programs that appeared in the search results were all outdated and didn’t support the latest libraries.

//
// ###########################################################
//
//      Majoka Iris 640*48px Stretch LCD Test Code
//
//      Hideto Kikuchi / PJ (@pcjpnet) - http://pc-jp.net/
//
// ###########################################################
//
//
//      Example Code for ESP32 Dev Module
//      Require LovyanGFX 0.3.6 Library
//
//
// ####################  LCD Pin Assignments  ####################
//  
//  0.5mm Pitch - 22Pin
//  
//  1   - GND   [to GND]
//  2   - RST   [to ESP32 - 32]
//  3   - GND   [to GND]
//  4   - D0    [to ESP32 - 12]
//  5   - D1    [to ESP32 - 13]
//  6   - D2    [to ESP32 - 26]
//  7   - D3    [to ESP32 - 25]
//  8   - D4    [to ESP32 - 17]
//  9   - D5    [to ESP32 - 16]
//  10  - D6    [to ESP32 - 27]
//  11  - D7    [to ESP32 - 14]
//  12  - CS 1  [to ESP32 - 33]
//  13  - RD    [to ESP32 - 2]
//  14  - WR    [to ESP32 - 4]
//  15  - CS 2  [to ESP32 - 33]
//  16  - DC    [to ESP32 - 15]
//  17  - TE    [OPEN]
//  18  - VDD   [to 3.3V]
//  19  - VDDIO [to 3.3V]
//  20  - LED+  [to 5.5V~]
//  21  - LED-  [to GND]
//  22  - GND   [to GND]
//
// * Note: GPIO 16 and 17 cannot be used when using PSRAM.

#include <LovyanGFX.hpp>


struct LGFX_Config {
  static constexpr int gpio_wr  =  4; //to LCD WR(14)
  static constexpr int gpio_rd  =  2; //to LCD RD(13)
  static constexpr int gpio_rs  = 15; //to LCD DC(16)
  static constexpr int gpio_d0  = 12; //to LCD D0(4)
  static constexpr int gpio_d1  = 13; //to LCD D1(5)
  static constexpr int gpio_d2  = 26; //to LCD D2(6)
  static constexpr int gpio_d3  = 25; //to LCD D3(7)
  static constexpr int gpio_d4  = 17; //to LCD D4(8)
  static constexpr int gpio_d5  = 16; //to LCD D5(9)
  static constexpr int gpio_d6  = 27; //to LCD D6(10)
  static constexpr int gpio_d7  = 14; //to LCD D7(11)
};


static lgfx::LGFX_PARALLEL<LGFX_Config> lcd;

static lgfx::Panel_ILI9342 panel;

static lgfx::LGFX_Sprite buf; // [640 * 48] Buffer

// ===== THIS IS SUSHI ===== //
extern const uint16_t sushi[];
uint16_t i = 0;


// ===== ENTER SUSHI SHOP ===== //
void setup() {
// Supported clock frequencies range from 20MHz to 6.7MHz. 
// The value will be adjusted to an integer divisor of 80MHz:
// 20MHz, 16MHz, 13.4MHz, 11.5MHz, 10MHz, 8.9MHz, 8MHz, 7.3MHz, 6.7MHz
  panel.freq_write = 16000000;
  panel.len_dummy_read_pixel = 8;

  panel.spi_cs = 33;  //to LCD CS(15)
  panel.spi_dc = -1;
  panel.gpio_rst = 32;  //to LCD RST(2)

  panel.gpio_bl  = -1;
  panel.pwm_ch_bl = -1;
  panel.backlight_level = true;

  panel.memory_width  = 320;
  panel.memory_height = 240;

  panel.panel_width  = 320;
  panel.panel_height = 96;

  panel.offset_x = 0;
  panel.offset_y = 144;

  panel.rotation = 0;

  panel.offset_rotation = 0;

  lcd.setPanel(&panel);

  lcd.init();
  lcd.setColorDepth(16);

  lcd.setRotation(0); // 0 or 2

  buf.setColorDepth(16);
  buf.createSprite(640, 48);
  buf.setSwapBytes(true);
}


// ===== MAIN SUSHI LOOP ===== //
void loop() {
  for (int j = 0; j < 7; j++)
  {
    buf.pushImage(i - 50 + j * 100, 0, 48, 48, sushi);

// rolling sushi.
//  buf.pushImageRotateZoom(i - 25 + j * 100, 24, 24, 24, i + j * 100, 1.0f, 1.0f, 48, 48, sushi);

// zooming sushi.
//  buf.pushImageRotateZoom(i - 20 + j * 100, 24, 24, 24, 0, 0.5f + ((float)i/100 + j)/5, 0.5f + ((float)i/100 + j)/5, 48, 48, sushi);
  }

  lcd_buffer_write();
  i++;
  if (i == 100) {
    i = 0;
  }
  delay(5);
}


// ===== 640*48px Buffer to 320*96px LCD ===== //
inline void lcd_buffer_write() {
  lcd.setAddrWindow(0, 0, 320, 96);
  lcd.pushPixels((lgfx::swap565_t*)buf.getBuffer(), 640 * 48);
}



// ===== THIS IS 48*48px SUSHI ARRAY ===== //
constexpr uint16_t sushi[2304] = {
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x1860, 0x69C5, 0x7A46, 0x82C8, 0x7B2B, 0x838C, 0x7BAE, 0x83AE, 0x7B2C, 0x5A07, 0x0821, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5143, 0xAB88,
    0xFD2E, 0xFDD0, 0xFDF0, 0xFDF1, 0xFE32, 0xFEB5, 0xFF16, 0xFEF7, 0xFEF6, 0xFEF6, 0xFED5, 0xFED5, 0xFF17, 0xFED6, 0xE551, 0x934A,
    0x5165, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7A65, 0xFDB0, 0xFE52, 0xFDD2,
    0xFD92, 0xFD71, 0xFD30, 0xF590, 0xFDB1, 0xFD4E, 0xF52D, 0xFD6D, 0xFD8E, 0xF5AE, 0xFDCF, 0xF5F0, 0xF5F0, 0xF5D1, 0xFDF1, 0xFDF1,
    0xFE12, 0xFE32, 0xCC2C, 0x5143, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD6F, 0xFE74, 0xFD91, 0xFC8D, 0xFC2B,
    0xFC4A, 0xF429, 0xFD0C, 0xF4CA, 0xFC88, 0xF4A9, 0xFCC9, 0xF4E9, 0xFD08, 0xFD09, 0xF509, 0xFD09, 0xF509, 0xFD2B, 0xF5AE, 0xF5AE,
    0xF5B0, 0xF5D1, 0xFDF2, 0xFE12, 0xFCEE, 0x5143, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1840, 0xFEB3, 0xFE54, 0xFC8D, 0xFC4A, 0xFC89, 0xFC88,
    0xFC86, 0xFDAD, 0xF528, 0xFD07, 0xFD27, 0xFD27, 0xFD47, 0xFD27, 0xF507, 0xFD07, 0xFCC6, 0xF54B, 0xFDAC, 0xF52A, 0xF4A7, 0xFCA8,
    0xF4A8, 0xF4AA, 0xF50C, 0xF54E, 0xFDB1, 0xFDB0, 0xE40A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFE72, 0xFDF3, 0xFCA9, 0xFD08, 0xFD48, 0xFD66, 0xFE2B,
    0xF60C, 0xFD46, 0xFD05, 0xFCE5, 0xFD05, 0xFCE5, 0xF4C5, 0xFD87, 0xFE4B, 0xF6B0, 0xFEAF, 0xFDC8, 0xFD26, 0xFCE7, 0xFCC7, 0xF4A8,
    0xFC87, 0xF487, 0xFC68, 0xF489, 0xF4CB, 0xF56F, 0xFD70, 0xFD8E, 0x28C2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9B48, 0xFEB4, 0xFD68, 0xFDA8, 0xFD86, 0xFCA5, 0xFD09, 0xFB43,
    0xFAE3, 0xFAA3, 0xFA62, 0xFA42, 0xFA62, 0xFB24, 0xFB86, 0xFAE3, 0xFAC1, 0xFAA0, 0xFB61, 0xFC85, 0xF5A8, 0xFE09, 0xFD87, 0xFD07,
    0xF4C6, 0xFC87, 0xF467, 0xFC67, 0xFC48, 0xFC6A, 0xF4EC, 0xFD4F, 0xFDAF, 0x69A3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFF17, 0xFD46, 0xFCC5, 0xFB84, 0xFAC3, 0xFBC7, 0xF9C1, 0xF9A1,
    0xF960, 0xF100, 0xE8E0, 0xF9E2, 0xE9A2, 0xF100, 0xF120, 0xE961, 0xF1A1, 0xFA02, 0xFA01, 0xFA01, 0xFA60, 0xFB41, 0xFCE5, 0xFE0B,
    0xFDEB, 0xFD69, 0xFD29, 0xF50A, 0xF50B, 0xFD0C, 0xF56E, 0xFD2F, 0xF54F, 0xFDCF, 0x30C2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1841, 0xFD09, 0xFB23, 0xFA42, 0xF940, 0xFA42, 0xD101, 0xBA05, 0xAAE9,
    0xABED, 0x93ED, 0x9C6F, 0x9CD1, 0xAD53, 0x9CF2, 0xACB1, 0xA40E, 0xB36D, 0xB288, 0xC902, 0xD8A0, 0xF161, 0xF263, 0xFB06, 0xFB22,
    0xFCE4, 0xF608, 0xFD88, 0xFD06, 0xFCC8, 0xFCA9, 0xFC89, 0xF48B, 0xFCED, 0xFD6F, 0xFDAF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDA85, 0xE9C3, 0xC3AC, 0xB533, 0xBE57, 0xDFBD, 0xE77D, 0xC677,
    0xDEFA, 0xD698, 0xE71B, 0xE6F9, 0xF77D, 0xE73B, 0xEF3B, 0xEF7D, 0xE71A, 0xD71A, 0xDF3B, 0xB594, 0xCCAF, 0xC102, 0xE060, 0xE940,
    0xF9E2, 0xFB42, 0xFD86, 0xFE2A, 0xFD68, 0xFD29, 0xFD0A, 0xFCCB, 0xFCCC, 0xFD0E, 0xFE52, 0x3103, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3A8A, 0xD79B, 0xBE36, 0xEF9D, 0xE71A, 0xEF3C, 0xE71A, 0xEF3C,
    0xE71A, 0xD6B9, 0xD678, 0xE73B, 0xDED9, 0xE71B, 0xE71A, 0xE6FA, 0xDEDA, 0xE71B, 0xE6FA, 0xE71B, 0xE73B, 0xCED9, 0xB553, 0xBA87,
    0xE0A0, 0xF181, 0xF9C1, 0xFBE3, 0xFEAC, 0xFE4E, 0xFDEC, 0xFDAD, 0xFD6D, 0xFD4E, 0xFED4, 0x2924, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xAD54, 0xD6D8, 0xCE36, 0xE73B, 0xBE36, 0xD6D9, 0xD71A,
    0xCED9, 0xDF3B, 0xD6D9, 0xDED9, 0xCE97, 0xD6D9, 0xD6D9, 0xD6B8, 0xDF3A, 0xDEFA, 0xDED9, 0xE6FA, 0xE6FA, 0xEF3B, 0xEF5B, 0xDF1B,
    0x9511, 0xB1C5, 0xF1C2, 0xF223, 0xFA61, 0xFCE4, 0xFDE7, 0xFD8A, 0xFD6B, 0xFDAE, 0xFE90, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4227, 0x9D53, 0xADB4, 0xE699, 0xF679, 0xFDD6,
    0xFD96, 0xFD55, 0xFD34, 0xFD34, 0xFD14, 0xFD14, 0xF514, 0xFDB6, 0xF618, 0xF658, 0xE698, 0xDEB9, 0xCEF9, 0xD6DA, 0xDEFA, 0xDEB9,
    0xEF3B, 0xC698, 0x9C4E, 0xC880, 0xF141, 0xF161, 0xFB23, 0xFD65, 0xFDA8, 0xFD27, 0xAB08, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41C7, 0xD514, 0xFDF7, 0xFD14, 0xFCB2, 0xF472,
    0xF430, 0xF3CF, 0xF38E, 0xF30C, 0xEB6E, 0xF411, 0xEBAE, 0xF34E, 0xEB4D, 0xEB8E, 0xF410, 0xF4B3, 0xFD75, 0xFE38, 0xE6B9, 0xD6F9,
    0xD6B9, 0xCE57, 0xF79D, 0xBE77, 0x9A47, 0xC8A0, 0xE8A0, 0xF120, 0xEA60, 0xD369, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF5D7, 0xFE38, 0xFD34, 0xF451, 0xF451, 0xEC31, 0xEC11,
    0xF3CF, 0xEC11, 0xF4B3, 0xF493, 0xF3CF, 0xF2AB, 0xF2CC, 0xEACC, 0xF2AB, 0xF2AC, 0xEA8B, 0xEB2D, 0xF430, 0xEC72, 0xFD55, 0xFDF7,
    0xEE57, 0xD697, 0xCED9, 0xE71B, 0xDF3A, 0xCEFA, 0xB552, 0xC5D5, 0xCEFB, 0xA5B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2945, 0xFE9A, 0xFCD3, 0xF471, 0xF3D0, 0xEBAF, 0xEBF0, 0xEC51, 0xEC52,
    0xF431, 0xEB6E, 0xEA6A, 0xEAAB, 0xEAAC, 0xEACC, 0xF2CB, 0xEACC, 0xF2AB, 0xF3AF, 0xF411, 0xF3AF, 0xEAAB, 0xF2EC, 0xEB2D, 0xF3CF,
    0xF4D3, 0xFD96, 0xEDF6, 0xD697, 0xCEB8, 0xDEB9, 0xE73B, 0xD698, 0xFFFD, 0x62C9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2945, 0xFD55, 0xFC71, 0xF3CF, 0xEAEC, 0xF410, 0xF411, 0xF36E, 0xEB2D, 0xF32D,
    0xEACC, 0xF2EC, 0xF34E, 0xF36E, 0xEB0D, 0xF30C, 0xF32E, 0xEB2D, 0xF3AF, 0xEA8B, 0xEA8A, 0xF2AC, 0xEB0C, 0xF30D, 0xEB2D, 0xF34D,
    0xEB6E, 0xF3CF, 0xF4D3, 0xFD76, 0xEDF6, 0xC656, 0xD6B8, 0xF77B, 0x632B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFE18, 0xFB6E, 0xF2EC, 0xF2AB, 0xF493, 0xF30C, 0xEAEC, 0xEB4E, 0xEB4E, 0xEC32,
    0xF4F4, 0xEBAF, 0xEA8B, 0xF24A, 0xEA4A, 0xEA4A, 0xEA4A, 0xF24A, 0xEA6A, 0xF26B, 0xEA6A, 0xEA6A, 0xEA4A, 0xEAAB, 0xF38F, 0xEBCF,
    0xF431, 0xF431, 0xF431, 0xF472, 0xF534, 0xFE39, 0x83CD, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA451, 0xFACB, 0xF2EC, 0xF28B, 0xF472, 0xF28B, 0xF30D, 0xF30D, 0xF2ED, 0xF515, 0xF493,
    0xEBB0, 0xF36F, 0xF32E, 0xEACC, 0xEA4A, 0xF22A, 0xEA29, 0xEA2A, 0xEA09, 0xEA29, 0xF2CC, 0xF411, 0xF3F0, 0xF34E, 0xEA8B, 0xF28B,
    0xEAEC, 0xEB2D, 0xF3AE, 0xEBF0, 0xF410, 0xF492, 0xFDF8, 0xE5F6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD96, 0xFAAB, 0xF34D, 0xFC31, 0xFA8A, 0xF1E9, 0xF26A, 0xF4B3, 0xF492, 0xE9E8, 0xE9E8,
    0xEA08, 0xEA08, 0xF1C8, 0xE9E8, 0xF2AB, 0xF2EC, 0xF2ED, 0xF32E, 0xF34E, 0xF32E, 0xEAEC, 0xEA09, 0xEA4A, 0xF2AB, 0xEAAB, 0xEA8B,
    0xF28B, 0xEACC, 0xEB0D, 0xF36E, 0xF3EF, 0xF430, 0xF471, 0xFD34, 0xFE59, 0x1082, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x3186, 0xFBCF, 0xFC73, 0xF36E, 0xE166, 0xD1E8, 0xD36E, 0xCB2C, 0xC945, 0xC125, 0xC186, 0xC166,
    0xC966, 0xC104, 0xCA6A, 0xD229, 0xD125, 0xD905, 0xE145, 0xE9A7, 0xF1C8, 0xF208, 0xF209, 0xEA0A, 0xEA4A, 0xEAAC, 0xF32E, 0xF30D,
    0xEACC, 0xF2AB, 0xF2AB, 0xEAAB, 0xF34E, 0xEC11, 0xF492, 0xF4F4, 0xFD54, 0xFEBB, 0x10A2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x728A, 0xFB8E, 0xD0C3, 0xC125, 0xB905, 0xC1C7, 0xB842, 0xB822, 0xB042, 0xB082, 0xB041, 0xB882,
    0xB862, 0xD2EB, 0xB8A2, 0xC0C3, 0xB0E4, 0xC124, 0xB925, 0xC145, 0xC945, 0xD125, 0xD905, 0xF249, 0xFBD0, 0xFBD0, 0xFCB3, 0xF515,
    0xFCB3, 0xF431, 0xF3F0, 0xF3AF, 0xF32D, 0xF2CC, 0xF34D, 0xF3CF, 0xF472, 0xFCD2, 0xFDF8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x6B0B, 0xF946, 0xC8A4, 0xB082, 0xA186, 0xAB6C, 0x9CB0, 0xADF5, 0xB676, 0xAE15, 0xCEFA, 0xB615,
    0xBDB5, 0xB532, 0xB450, 0xAB0A, 0xAA69, 0xA145, 0xA062, 0xB082, 0xC0C3, 0xC104, 0xCA8A, 0xC186, 0xC904, 0xD125, 0xD986, 0xEA8B,
    0xF38F, 0xFC32, 0xF3D0, 0xF34E, 0xF30C, 0xF2CC, 0xF2EC, 0xF32D, 0xF3CF, 0xFC92, 0xFCF3, 0x5208, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA470, 0xBDB4, 0xD79C, 0xDF9C, 0xEF9D, 0xEF7D, 0xF7BD, 0xEF5D, 0xEF7C, 0xEF7D, 0xEF7D,
    0xE73B, 0xE75C, 0xDEFA, 0xE79D, 0xDF9C, 0xDFBD, 0xC719, 0xADD5, 0x9C0E, 0xA2CA, 0xA0A2, 0xB862, 0xC104, 0xC125, 0xC945, 0xC966,
    0xD166, 0xE229, 0xFB4E, 0xFBF1, 0xFBD0, 0xF34D, 0xF2EC, 0xFAEC, 0xF32D, 0xF3CF, 0xFC71, 0x9B8E, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x634C, 0xEF7C, 0xF7BE, 0xEF9D, 0xF79D, 0xE75C, 0xDEFA, 0xE73B, 0xE71B, 0xEF5C, 0xE73B,
    0xE71B, 0xEF9D, 0xF79D, 0xEF7D, 0xEF7D, 0xE6FA, 0xEF9D, 0xEF5B, 0xE75C, 0xDF3B, 0xE7FE, 0xAD94, 0xA32B, 0x9861, 0xC0A3, 0xC104,
    0xC965, 0xD167, 0xD145, 0xE1A7, 0xFAEC, 0xFB8F, 0xFB0D, 0xF2CC, 0xFAEC, 0xF34D, 0xFC51, 0x9BCF, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x10A2, 0xFFFF, 0xDEFA, 0xDEFA, 0xEF5C, 0xE75B, 0xE73B, 0xE73B, 0xDEFA, 0xD6B9, 0xD6D9,
    0xEF5C, 0xE71A, 0xDF1B, 0xE73B, 0xE73B, 0xE73B, 0xE73C, 0xEF5C, 0xEF7D, 0xEF7D, 0xEF7D, 0xEF9C, 0xEFBD, 0xDFBD, 0xA4F2, 0xA185,
    0xB862, 0xC0E3, 0xCA29, 0xD2AB, 0xD1A7, 0xEA29, 0xFB4D, 0xFBAF, 0xFBAF, 0xFC72, 0xFB8E, 0x7B6D, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x630A, 0xE719, 0xD6D9, 0xDEDA, 0xC657, 0xD698, 0xD6B9, 0xD698, 0xD6B9, 0xE71B,
    0xCE77, 0xDEFA, 0xDEDA, 0xD6B9, 0xE71B, 0xDF1B, 0xDEFA, 0xDF1A, 0xE73C, 0xEF7C, 0xEF7C, 0xF7BE, 0xEF7D, 0xEF9D, 0xE75B, 0xD75B,
    0xA5B4, 0x91A6, 0xC125, 0xC0C3, 0xC925, 0xC8E5, 0xE105, 0xFA29, 0xFB4D, 0xFB8E, 0xFB6E, 0x4249, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39C6, 0xBE15, 0xD677, 0xE73B, 0xDEFA, 0xDEDA, 0xD6D9, 0xD6D9, 0xCE78,
    0xC657, 0xDEFA, 0xCE78, 0xCE77, 0xE71B, 0xCE98, 0xE71B, 0xDEFA, 0xDF1A, 0xDEFA, 0xEF5C, 0xE71B, 0xE73B, 0xE73C, 0xE71B, 0xF7BE,
    0xEF7D, 0xE7DD, 0xA552, 0xA145, 0xB882, 0xC145, 0xC105, 0xD105, 0xE905, 0xF966, 0xFD35, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18C2, 0x632B, 0xAD93, 0xF79C, 0xDED9, 0xCE57, 0xDED9,
    0xD6B9, 0xCE57, 0xCE78, 0xDEFA, 0xDED9, 0xBDF5, 0xE71B, 0xDEFA, 0xD698, 0xE71A, 0xDF1A, 0xCE98, 0xDF1B, 0xDED9, 0xE73B, 0xE75C,
    0xF79D, 0xE73B, 0xF7BE, 0xDFDD, 0xACD1, 0xA0C3, 0xA8A3, 0xA8E3, 0xB0E4, 0xE0C4, 0xA451, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3A07, 0x7BEE, 0xC616,
    0xDEF9, 0xCE77, 0xD6B8, 0xCE98, 0xDEB9, 0xE73B, 0xDED9, 0xCE98, 0xEF3C, 0xCE98, 0xD6B9, 0xD6B9, 0xDED9, 0xDEDA, 0xCE77, 0xDEFB,
    0xDEFA, 0xDF1A, 0xEF5C, 0xE71B, 0xEF9D, 0xD79C, 0xACB0, 0x9A28, 0xBA8A, 0xDD13, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x4227, 0x632B, 0x8C4F, 0xC636, 0xDEF9, 0xD698, 0xDEF9, 0xBE16, 0xD6B9, 0xD6B8, 0xC616, 0xBDD5, 0xCE77, 0xDEFA, 0xD698,
    0xD6B9, 0xD698, 0xDF1B, 0xE71B, 0xDF1B, 0xEF7C, 0xD6FA, 0xEF9D, 0xADF5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2123, 0x7BCE, 0xDEF9, 0xCE97, 0xDED9, 0xE73A, 0xDF3B, 0xD6B9, 0xCE98, 0xD698,
    0xD698, 0xD6B9, 0xC636, 0xE71B, 0xCE77, 0xD6B9, 0xF79D, 0xFFFE, 0x0040, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39C6, 0x52A9, 0x5AA9, 0x8C4F, 0xD6B9,
    0xD6D8, 0xDED9, 0xD6F9, 0xD6B8, 0xC616, 0xDED9, 0x9D11, 0x0861, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0840, 0x4A48, 0x52CA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

Therefore, I used AI to modify the code so that the test programs now run with the latest libraries.

The prompt is as follows, and the modified program is written below it.

The original program worked with LovyanGFX library version 0.3.6. Please modify the program to work with the Freenov esp32-wroom32e board, using LovyanGFX library version 1.2.21 and ESP32 board version 2.0.17.

// ####################  LCD Pin Assignments  ####################
//  
//  0.5mm Pitch - 22Pin
//  
//  1   - GND   [to GND]
//  2   - RST   [to ESP32 - 15]
//  3   - GND   [to GND]
//  4   - D0    [to ESP32 - 13]
//  5   - D1    [to ESP32 - 12]
//  6   - D2    [to ESP32 - 14]
//  7   - D3    [to ESP32 - 27]
//  8   - D4    [to ESP32 - 26]
//  9   - D5    [to ESP32 - 25]
//  10  - D6    [to ESP32 - 33]
//  11  - D7    [to ESP32 - 32]
//  12  - CS 1  [to ESP32 - 2]
//  13  - RD    [to ESP32 - 4]
//  14  - WR    [to ESP32 - 5]
//  15  - CS 2  [to ESP32 - 2]
//  16  - DC    [to ESP32 - 18]
//  17  - TE    [OPEN]
//  18  - VDD   [to 3.3V]
//  19  - VDDIO [to 3.3V]
//  20  - LED+  [to 5.5V~]
//  21  - LED-  [to GND]
//  22  - GND   [to GND]
//
// Note: GPIO 16 and 17 cannot be used when PSRAM is enabled.
// Simplified wiring (Parallel bus, separated control lines pattern)
// ###########################################################
//
//      Majoca Iris 640*48px Ultra-wide LCD Operation Test Code
//
//      Hideto Kikuchi / PJ (@pcjpnet) - http://pc-jp.net
//
// ###########################################################

#include <LovyanGFX.hpp>

// Custom configuration class definition for LovyanGFX v1.x
class LGFX_ESP32_Parallel : public lgfx::LGFX_Device {
  lgfx::Bus_Parallel8 _bus_instance;   // 8-bit parallel bus instance
  lgfx::Panel_ILI9342 _panel_instance; // Panel instance
  // If you use a backlight, define lgfx::Light_PWM here, but it is omitted this time as it is not needed.

public:
  LGFX_ESP32_Parallel(void) {
    { // Parallel bus configuration
      auto cfg = _bus_instance.config();

      cfg.freq_write = 16000000; // Write clock
      cfg.pin_wr     = 5;        // LCD WR (14)
      cfg.pin_rd     = 4;        // LCD RD (13)
      cfg.pin_rs     = 18;       // LCD DC (16)
      cfg.pin_d0     = 13;       // LCD D0 (4)
      cfg.pin_d1     = 12;       // LCD D1 (5)
      cfg.pin_d2     = 14;       // LCD D2 (6)
      cfg.pin_d3     = 27;       // LCD D3 (7)
      cfg.pin_d4     = 26;       // LCD D4 (8)
      cfg.pin_d5     = 25;       // LCD D5 (9)
      cfg.pin_d6     = 33;       // LCD D6 (10)
      cfg.pin_d7     = 32;       // LCD D7 (11)

      _bus_instance.config(cfg);
      _panel_instance.setBus(&_bus_instance);
    }

    { // LCD panel configuration
      auto cfg = _panel_instance.config();

      cfg.pin_cs           = 2;    // LCD CS1(12) / CS2(15)
      cfg.pin_rst          = 15;   // LCD RST (2)
      // [FIX] Removed cfg.pin_bl = -1 which was causing an error

      cfg.memory_width     = 320;   // Memory width
      cfg.memory_height    = 240;   // Memory height
      cfg.panel_width      = 320;   // Panel width
      cfg.panel_height     = 96;    // Panel height
      cfg.offset_x         = 0;     // X offset
      cfg.offset_y         = 144;   // Y offset

      cfg.offset_rotation  = 0;

      _panel_instance.config(cfg);
    }

    setPanel(&_panel_instance); // Register the panel instance to the device
  }
};

// Instantiate the custom class
static LGFX_ESP32_Parallel lcd;

static lgfx::LGFX_Sprite buf; // [640 * 48] Buffer

// ===== THIS IS SUSHI ===== //
extern const uint16_t sushi[];
uint16_t i = 0;


// ===== ENTER SUSHI SHOP ===== //
void setup() {
  // Note: Direct assignment to old panel objects is no longer needed as it has all been moved into the class above.

  lcd.init();
  lcd.setColorDepth(16);
  lcd.setRotation(0); // 0 or 2

  buf.setColorDepth(16);
  buf.createSprite(640, 48);
  buf.setSwapBytes(true);
}



// ===== MAIN SUSHI LOOP ===== //
void loop() {
  for (int j = 0; j < 7; j++)
  {
    buf.pushImage(i - 50 + j * 100, 0, 48, 48, sushi);

// rolling sushi.
//  buf.pushImageRotateZoom(i - 25 + j * 100, 24, 24, 24, i + j * 100, 1.0f, 1.0f, 48, 48, sushi);

// zooming sushi.
//  buf.pushImageRotateZoom(i - 20 + j * 100, 24, 24, 24, 0, 0.5f + ((float)i/100 + j)/5, 0.5f + ((float)i/100 + j)/5, 48, 48, sushi);
  }

  lcd_buffer_write();
  i++;
  if (i == 100) {
    i = 0;
  }
  delay(5);
}


// ===== 640*48px Buffer to 320*96px LCD ===== //
inline void lcd_buffer_write() {
  lcd.setAddrWindow(0, 0, 320, 96);
  lcd.pushPixels((lgfx::swap565_t*)buf.getBuffer(), 640 * 48);
}



// ===== THIS IS 48*48px SUSHI ARRAY ===== //

constexpr uint16_t sushi[2304] = {
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x1860, 0x69C5, 0x7A46, 0x82C8, 0x7B2B, 0x838C, 0x7BAE, 0x83AE, 0x7B2C, 0x5A07, 0x0821, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5143, 0xAB88,
    0xFD2E, 0xFDD0, 0xFDF0, 0xFDF1, 0xFE32, 0xFEB5, 0xFF16, 0xFEF7, 0xFEF6, 0xFEF6, 0xFED5, 0xFED5, 0xFF17, 0xFED6, 0xE551, 0x934A,
    0x5165, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7A65, 0xFDB0, 0xFE52, 0xFDD2,
    0xFD92, 0xFD71, 0xFD30, 0xF590, 0xFDB1, 0xFD4E, 0xF52D, 0xFD6D, 0xFD8E, 0xF5AE, 0xFDCF, 0xF5F0, 0xF5F0, 0xF5D1, 0xFDF1, 0xFDF1,
    0xFE12, 0xFE32, 0xCC2C, 0x5143, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD6F, 0xFE74, 0xFD91, 0xFC8D, 0xFC2B,
    0xFC4A, 0xF429, 0xFD0C, 0xF4CA, 0xFC88, 0xF4A9, 0xFCC9, 0xF4E9, 0xFD08, 0xFD09, 0xF509, 0xFD09, 0xF509, 0xFD2B, 0xF5AE, 0xF5AE,
    0xF5B0, 0xF5D1, 0xFDF2, 0xFE12, 0xFCEE, 0x5143, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1840, 0xFEB3, 0xFE54, 0xFC8D, 0xFC4A, 0xFC89, 0xFC88,
    0xFC86, 0xFDAD, 0xF528, 0xFD07, 0xFD27, 0xFD27, 0xFD47, 0xFD27, 0xF507, 0xFD07, 0xFCC6, 0xF54B, 0xFDAC, 0xF52A, 0xF4A7, 0xFCA8,
    0xF4A8, 0xF4AA, 0xF50C, 0xF54E, 0xFDB1, 0xFDB0, 0xE40A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFE72, 0xFDF3, 0xFCA9, 0xFD08, 0xFD48, 0xFD66, 0xFE2B,
    0xF60C, 0xFD46, 0xFD05, 0xFCE5, 0xFD05, 0xFCE5, 0xF4C5, 0xFD87, 0xFE4B, 0xF6B0, 0xFEAF, 0xFDC8, 0xFD26, 0xFCE7, 0xFCC7, 0xF4A8,
    0xFC87, 0xF487, 0xFC68, 0xF489, 0xF4CB, 0xF56F, 0xFD70, 0xFD8E, 0x28C2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9B48, 0xFEB4, 0xFD68, 0xFDA8, 0xFD86, 0xFCA5, 0xFD09, 0xFB43,
    0xFAE3, 0xFAA3, 0xFA62, 0xFA42, 0xFA62, 0xFB24, 0xFB86, 0xFAE3, 0xFAC1, 0xFAA0, 0xFB61, 0xFC85, 0xF5A8, 0xFE09, 0xFD87, 0xFD07,
    0xF4C6, 0xFC87, 0xF467, 0xFC67, 0xFC48, 0xFC6A, 0xF4EC, 0xFD4F, 0xFDAF, 0x69A3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFF17, 0xFD46, 0xFCC5, 0xFB84, 0xFAC3, 0xFBC7, 0xF9C1, 0xF9A1,
    0xF960, 0xF100, 0xE8E0, 0xF9E2, 0xE9A2, 0xF100, 0xF120, 0xE961, 0xF1A1, 0xFA02, 0xFA01, 0xFA01, 0xFA60, 0xFB41, 0xFCE5, 0xFE0B,
    0xFDEB, 0xFD69, 0xFD29, 0xF50A, 0xF50B, 0xFD0C, 0xF56E, 0xFD2F, 0xF54F, 0xFDCF, 0x30C2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1841, 0xFD09, 0xFB23, 0xFA42, 0xF940, 0xFA42, 0xD101, 0xBA05, 0xAAE9,
    0xABED, 0x93ED, 0x9C6F, 0x9CD1, 0xAD53, 0x9CF2, 0xACB1, 0xA40E, 0xB36D, 0xB288, 0xC902, 0xD8A0, 0xF161, 0xF263, 0xFB06, 0xFB22,
    0xFCE4, 0xF608, 0xFD88, 0xFD06, 0xFCC8, 0xFCA9, 0xFC89, 0xF48B, 0xFCED, 0xFD6F, 0xFDAF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDA85, 0xE9C3, 0xC3AC, 0xB533, 0xBE57, 0xDFBD, 0xE77D, 0xC677,
    0xDEFA, 0xD698, 0xE71B, 0xE6F9, 0xF77D, 0xE73B, 0xEF3B, 0xEF7D, 0xE71A, 0xD71A, 0xDF3B, 0xB594, 0xCCAF, 0xC102, 0xE060, 0xE940,
    0xF9E2, 0xFB42, 0xFD86, 0xFE2A, 0xFD68, 0xFD29, 0xFD0A, 0xFCCB, 0xFCCC, 0xFD0E, 0xFE52, 0x3103, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3A8A, 0xD79B, 0xBE36, 0xEF9D, 0xE71A, 0xEF3C, 0xE71A, 0xEF3C,
    0xE71A, 0xD6B9, 0xD678, 0xE73B, 0xDED9, 0xE71B, 0xE71A, 0xE6FA, 0xDEDA, 0xE71B, 0xE6FA, 0xE71B, 0xE73B, 0xCED9, 0xB553, 0xBA87,
    0xE0A0, 0xF181, 0xF9C1, 0xFBE3, 0xFEAC, 0xFE4E, 0xFDEC, 0xFDAD, 0xFD6D, 0xFD4E, 0xFED4, 0x2924, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xAD54, 0xD6D8, 0xCE36, 0xE73B, 0xBE36, 0xD6D9, 0xD71A,
    0xCED9, 0xDF3B, 0xD6D9, 0xDED9, 0xCE97, 0xD6D9, 0xD6D9, 0xD6B8, 0xDF3A, 0xDEFA, 0xDED9, 0xE6FA, 0xE6FA, 0xEF3B, 0xEF5B, 0xDF1B,
    0x9511, 0xB1C5, 0xF1C2, 0xF223, 0xFA61, 0xFCE4, 0xFDE7, 0xFD8A, 0xFD6B, 0xFDAE, 0xFE90, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4227, 0x9D53, 0xADB4, 0xE699, 0xF679, 0xFDD6,
    0xFD96, 0xFD55, 0xFD34, 0xFD34, 0xFD14, 0xFD14, 0xF514, 0xFDB6, 0xF618, 0xF658, 0xE698, 0xDEB9, 0xCEF9, 0xD6DA, 0xDEFA, 0xDEB9,
    0xEF3B, 0xC698, 0x9C4E, 0xC880, 0xF141, 0xF161, 0xFB23, 0xFD65, 0xFDA8, 0xFD27, 0xAB08, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41C7, 0xD514, 0xFDF7, 0xFD14, 0xFCB2, 0xF472,
    0xF430, 0xF3CF, 0xF38E, 0xF30C, 0xEB6E, 0xF411, 0xEBAE, 0xF34E, 0xEB4D, 0xEB8E, 0xF410, 0xF4B3, 0xFD75, 0xFE38, 0xE6B9, 0xD6F9,
    0xD6B9, 0xCE57, 0xF79D, 0xBE77, 0x9A47, 0xC8A0, 0xE8A0, 0xF120, 0xEA60, 0xD369, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF5D7, 0xFE38, 0xFD34, 0xF451, 0xF451, 0xEC31, 0xEC11,
    0xF3CF, 0xEC11, 0xF4B3, 0xF493, 0xF3CF, 0xF2AB, 0xF2CC, 0xEACC, 0xF2AB, 0xF2AC, 0xEA8B, 0xEB2D, 0xF430, 0xEC72, 0xFD55, 0xFDF7,
    0xEE57, 0xD697, 0xCED9, 0xE71B, 0xDF3A, 0xCEFA, 0xB552, 0xC5D5, 0xCEFB, 0xA5B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2945, 0xFE9A, 0xFCD3, 0xF471, 0xF3D0, 0xEBAF, 0xEBF0, 0xEC51, 0xEC52,
    0xF431, 0xEB6E, 0xEA6A, 0xEAAB, 0xEAAC, 0xEACC, 0xF2CB, 0xEACC, 0xF2AB, 0xF3AF, 0xF411, 0xF3AF, 0xEAAB, 0xF2EC, 0xEB2D, 0xF3CF,
    0xF4D3, 0xFD96, 0xEDF6, 0xD697, 0xCEB8, 0xDEB9, 0xE73B, 0xD698, 0xFFFD, 0x62C9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2945, 0xFD55, 0xFC71, 0xF3CF, 0xEAEC, 0xF410, 0xF411, 0xF36E, 0xEB2D, 0xF32D,
    0xEACC, 0xF2EC, 0xF34E, 0xF36E, 0xEB0D, 0xF30C, 0xF32E, 0xEB2D, 0xF3AF, 0xEA8B, 0xEA8A, 0xF2AC, 0xEB0C, 0xF30D, 0xEB2D, 0xF34D,
    0xEB6E, 0xF3CF, 0xF4D3, 0xFD76, 0xEDF6, 0xC656, 0xD6B8, 0xF77B, 0x632B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFE18, 0xFB6E, 0xF2EC, 0xF2AB, 0xF493, 0xF30C, 0xEAEC, 0xEB4E, 0xEB4E, 0xEC32,
    0xF4F4, 0xEBAF, 0xEA8B, 0xF24A, 0xEA4A, 0xEA4A, 0xEA4A, 0xF24A, 0xEA6A, 0xF26B, 0xEA6A, 0xEA6A, 0xEA4A, 0xEAAB, 0xF38F, 0xEBCF,
    0xF431, 0xF431, 0xF431, 0xF472, 0xF534, 0xFE39, 0x83CD, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA451, 0xFACB, 0xF2EC, 0xF28B, 0xF472, 0xF28B, 0xF30D, 0xF30D, 0xF2ED, 0xF515, 0xF493,
    0xEBB0, 0xF36F, 0xF32E, 0xEACC, 0xEA4A, 0xF22A, 0xEA29, 0xEA2A, 0xEA09, 0xEA29, 0xF2CC, 0xF411, 0xF3F0, 0xF34E, 0xEA8B, 0xF28B,
    0xEAEC, 0xEB2D, 0xF3AE, 0xEBF0, 0xF410, 0xF492, 0xFDF8, 0xE5F6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD96, 0xFAAB, 0xF34D, 0xFC31, 0xFA8A, 0xF1E9, 0xF26A, 0xF4B3, 0xF492, 0xE9E8, 0xE9E8,
    0xEA08, 0xEA08, 0xF1C8, 0xE9E8, 0xF2AB, 0xF2EC, 0xF2ED, 0xF32E, 0xF34E, 0xF32E, 0xEAEC, 0xEA09, 0xEA4A, 0xF2AB, 0xEAAB, 0xEA8B,
    0xF28B, 0xEACC, 0xEB0D, 0xF36E, 0xF3EF, 0xF430, 0xF471, 0xFD34, 0xFE59, 0x1082, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x3186, 0xFBCF, 0xFC73, 0xF36E, 0xE166, 0xD1E8, 0xD36E, 0xCB2C, 0xC945, 0xC125, 0xC186, 0xC166,
    0xC966, 0xC104, 0xCA6A, 0xD229, 0xD125, 0xD905, 0xE145, 0xE9A7, 0xF1C8, 0xF208, 0xF209, 0xEA0A, 0xEA4A, 0xEAAC, 0xF32E, 0xF30D,
    0xEACC, 0xF2AB, 0xF2AB, 0xEAAB, 0xF34E, 0xEC11, 0xF492, 0xF4F4, 0xFD54, 0xFEBB, 0x10A2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x728A, 0xFB8E, 0xD0C3, 0xC125, 0xB905, 0xC1C7, 0xB842, 0xB822, 0xB042, 0xB082, 0xB041, 0xB882,
    0xB862, 0xD2EB, 0xB8A2, 0xC0C3, 0xB0E4, 0xC124, 0xB925, 0xC145, 0xC945, 0xD125, 0xD905, 0xF249, 0xFBD0, 0xFBD0, 0xFCB3, 0xF515,
    0xFCB3, 0xF431, 0xF3F0, 0xF3AF, 0xF32D, 0xF2CC, 0xF34D, 0xF3CF, 0xF472, 0xFCD2, 0xFDF8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x6B0B, 0xF946, 0xC8A4, 0xB082, 0xA186, 0xAB6C, 0x9CB0, 0xADF5, 0xB676, 0xAE15, 0xCEFA, 0xB615,
    0xBDB5, 0xB532, 0xB450, 0xAB0A, 0xAA69, 0xA145, 0xA062, 0xB082, 0xC0C3, 0xC104, 0xCA8A, 0xC186, 0xC904, 0xD125, 0xD986, 0xEA8B,
    0xF38F, 0xFC32, 0xF3D0, 0xF34E, 0xF30C, 0xF2CC, 0xF2EC, 0xF32D, 0xF3CF, 0xFC92, 0xFCF3, 0x5208, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA470, 0xBDB4, 0xD79C, 0xDF9C, 0xEF9D, 0xEF7D, 0xF7BD, 0xEF5D, 0xEF7C, 0xEF7D, 0xEF7D,
    0xE73B, 0xE75C, 0xDEFA, 0xE79D, 0xDF9C, 0xDFBD, 0xC719, 0xADD5, 0x9C0E, 0xA2CA, 0xA0A2, 0xB862, 0xC104, 0xC125, 0xC945, 0xC966,
    0xD166, 0xE229, 0xFB4E, 0xFBF1, 0xFBD0, 0xF34D, 0xF2EC, 0xFAEC, 0xF32D, 0xF3CF, 0xFC71, 0x9B8E, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x634C, 0xEF7C, 0xF7BE, 0xEF9D, 0xF79D, 0xE75C, 0xDEFA, 0xE73B, 0xE71B, 0xEF5C, 0xE73B,
    0xE71B, 0xEF9D, 0xF79D, 0xEF7D, 0xEF7D, 0xE6FA, 0xEF9D, 0xEF5B, 0xE75C, 0xDF3B, 0xE7FE, 0xAD94, 0xA32B, 0x9861, 0xC0A3, 0xC104,
    0xC965, 0xD167, 0xD145, 0xE1A7, 0xFAEC, 0xFB8F, 0xFB0D, 0xF2CC, 0xFAEC, 0xF34D, 0xFC51, 0x9BCF, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x10A2, 0xFFFF, 0xDEFA, 0xDEFA, 0xEF5C, 0xE75B, 0xE73B, 0xE73B, 0xDEFA, 0xD6B9, 0xD6D9,
    0xEF5C, 0xE71A, 0xDF1B, 0xE73B, 0xE73B, 0xE73B, 0xE73C, 0xEF5C, 0xEF7D, 0xEF7D, 0xEF7D, 0xEF9C, 0xEFBD, 0xDFBD, 0xA4F2, 0xA185,
    0xB862, 0xC0E3, 0xCA29, 0xD2AB, 0xD1A7, 0xEA29, 0xFB4D, 0xFBAF, 0xFBAF, 0xFC72, 0xFB8E, 0x7B6D, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x630A, 0xE719, 0xD6D9, 0xDEDA, 0xC657, 0xD698, 0xD6B9, 0xD698, 0xD6B9, 0xE71B,
    0xCE77, 0xDEFA, 0xDEDA, 0xD6B9, 0xE71B, 0xDF1B, 0xDEFA, 0xDF1A, 0xE73C, 0xEF7C, 0xEF7C, 0xF7BE, 0xEF7D, 0xEF9D, 0xE75B, 0xD75B,
    0xA5B4, 0x91A6, 0xC125, 0xC0C3, 0xC925, 0xC8E5, 0xE105, 0xFA29, 0xFB4D, 0xFB8E, 0xFB6E, 0x4249, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39C6, 0xBE15, 0xD677, 0xE73B, 0xDEFA, 0xDEDA, 0xD6D9, 0xD6D9, 0xCE78,
    0xC657, 0xDEFA, 0xCE78, 0xCE77, 0xE71B, 0xCE98, 0xE71B, 0xDEFA, 0xDF1A, 0xDEFA, 0xEF5C, 0xE71B, 0xE73B, 0xE73C, 0xE71B, 0xF7BE,
    0xEF7D, 0xE7DD, 0xA552, 0xA145, 0xB882, 0xC145, 0xC105, 0xD105, 0xE905, 0xF966, 0xFD35, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18C2, 0x632B, 0xAD93, 0xF79C, 0xDED9, 0xCE57, 0xDED9,
    0xD6B9, 0xCE57, 0xCE78, 0xDEFA, 0xDED9, 0xBDF5, 0xE71B, 0xDEFA, 0xD698, 0xE71A, 0xDF1A, 0xCE98, 0xDF1B, 0xDED9, 0xE73B, 0xE75C,
    0xF79D, 0xE73B, 0xF7BE, 0xDFDD, 0xACD1, 0xA0C3, 0xA8A3, 0xA8E3, 0xB0E4, 0xE0C4, 0xA451, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3A07, 0x7BEE, 0xC616,
    0xDEF9, 0xCE77, 0xD6B8, 0xCE98, 0xDEB9, 0xE73B, 0xDED9, 0xCE98, 0xEF3C, 0xCE98, 0xD6B9, 0xD6B9, 0xDED9, 0xDEDA, 0xCE77, 0xDEFB,
    0xDEFA, 0xDF1A, 0xEF5C, 0xE71B, 0xEF9D, 0xD79C, 0xACB0, 0x9A28, 0xBA8A, 0xDD13, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x4227, 0x632B, 0x8C4F, 0xC636, 0xDEF9, 0xD698, 0xDEF9, 0xBE16, 0xD6B9, 0xD6B8, 0xC616, 0xBDD5, 0xCE77, 0xDEFA, 0xD698,
    0xD6B9, 0xD698, 0xDF1B, 0xE71B, 0xDF1B, 0xEF7C, 0xD6FA, 0xEF9D, 0xADF5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2123, 0x7BCE, 0xDEF9, 0xCE97, 0xDED9, 0xE73A, 0xDF3B, 0xD6B9, 0xCE98, 0xD698,
    0xD698, 0xD6B9, 0xC636, 0xE71B, 0xCE77, 0xD6B9, 0xF79D, 0xFFFE, 0x0040, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39C6, 0x52A9, 0x5AA9, 0x8C4F, 0xD6B9,
    0xD6D8, 0xDED9, 0xD6F9, 0xD6B8, 0xC616, 0xDED9, 0x9D11, 0x0861, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0840, 0x4A48, 0x52CA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

I also confirmed that DMX data can be received using the sample code from the esp-dmx library.

Then, using AI, we generated the final program that was used from the two programs that had been confirmed to be working.

The prompt is as follows:

First, we’ll use the LCD program to draw a green sine wave.

Next, we’ll shrink the waveform. We’ll set the 3rd pixel from the left as 1 and draw up to the 512th pixel.

Please map these pixels to the DMX values ​​from 1 to 512, and round the values ​​from 0 to 255 so that they fit within the range of 0 to 48 pixels before displaying them.

The first pixel should display the rounded value of the start code, and the second pixel should draw a white line vertically.

Draw a rectangle within the right margin, 5 pixels inside the outer edge, and make it blink constantly. Also, change its color to green when the DMX is connected and red when it is not, and display the words “connected” or “not connected” in the center of this rectangle.

There is a bug in the operation. When the wiring is reconnected, the DMX recognition is off and the display starts midway, so please add a delay to the screen to display “receiving” until the break signal is recognized, so that the DMX signal is properly received.

The following program is the final version after resolving the above prompts and compilation errors.

#include <Arduino.h>
#include <esp_dmx.h>
#include <LovyanGFX.hpp>

// ####################  LCD & DMX Pin Assignments  ####################
int transmitPin = 19;
int receivePin = 18;
int enablePin = 21;

dmx_port_t dmxPort = 1;
byte data[DMX_PACKET_SIZE]; 

// “Render-only data buffer” to prevent rendering glitches upon reconnection
byte dmx_render_buffer[DMX_PACKET_SIZE]; 

bool dmxIsConnected = false;
unsigned long lastUpdate = millis();

// Extend the graph rendering delay upon reconnection to a slightly longer “800 ms”
unsigned long connectedActionMillis = 0;   
const unsigned long GRAPH_DELAY_MS = 800;   

// ####################  Settings for adjusting the blinking speed  ####################
const unsigned long BLINK_INTERVAL_MS = 300; 

// ####################  LovyanGFX Configuration  ####################
class LGFX_ESP32_Parallel : public lgfx::LGFX_Device {
  lgfx::Bus_Parallel8 _bus_instance;   
  lgfx::Panel_ILI9342 _panel_instance; 

public:
  LGFX_ESP32_Parallel(void) {
    { // Parallel bus configuration
      auto cfg = _bus_instance.config();
      cfg.freq_write = 16000000; 
      cfg.pin_wr     = 4;        
      cfg.pin_rd     = 2;        
      cfg.pin_rs     = 5;        
      cfg.pin_d0     = 12;       
      cfg.pin_d1     = 14;       
      cfg.pin_d2     = 27;       
      cfg.pin_d3     = 26;       
      cfg.pin_d4     = 25;       
      cfg.pin_d5     = 33;       
      cfg.pin_d6     = 32;       
      cfg.pin_d7     = 15;       
      _bus_instance.config(cfg);
      _panel_instance.setBus(&_bus_instance);
    }

    { // LCD panel configuration
      auto cfg = _panel_instance.config();
      cfg.pin_cs           = 22;    
      cfg.pin_rst          = 13;    
      cfg.memory_width     = 320;   
      cfg.memory_height    = 240;   
      cfg.panel_width      = 320;   
      cfg.panel_height     = 96;    
      cfg.offset_x         = 0;     
      cfg.offset_y         = 144;   
      cfg.offset_rotation  = 0;
      _panel_instance.config(cfg);
    }
    setPanel(&_panel_instance); 
  }
};

static LGFX_ESP32_Parallel lcd;
static lgfx::LGFX_Sprite buf; // [640 * 48] Buffer

unsigned long lastBlinkMillis = 0;
bool blinkState = false;

void initDMXDriver() {
  dmx_config_t config = DMX_CONFIG_DEFAULT;
  dmx_personality_t personalities[] = {
    {1, "Default Personality"}
  };
  int personality_count = 1;
  dmx_driver_install(dmxPort, &config, personalities, personality_count);
  dmx_set_pin(dmxPort, transmitPin, receivePin, enablePin);
}

// ==================== SETUP ====================
void setup() {
  Serial.begin(115200);

  initDMXDriver();

  lcd.init();
  lcd.setColorDepth(16);
  lcd.setRotation(0); 

  buf.setColorDepth(16);
  buf.createSprite(640, 48);
  buf.setSwapBytes(true);

  memset(data, 0, sizeof(data));
  memset(dmx_render_buffer, 0, sizeof(dmx_render_buffer));
}

// ==================== 640*48px Buffer to 320*96px LCD ====================
inline void lcd_buffer_write() {
  lcd.pushImage(0, 0, 320, 96, (lgfx::swap565_t*)buf.getBuffer());
}

// ==================== MAIN LOOP ====================
void loop() {
  dmx_packet_t packet;
  unsigned long currentMillis = millis();

  // ★ [Important Change] Reduced the timeout duration from the default (1 second or more) to “35 milliseconds”
  // This value allows for the fastest possible detection of a disconnection, taking into account the time required to transmit a single DMX packet (approximately 23 ms to 44 ms)

  if (dmx_receive(dmxPort, &packet, 35 / portTICK_PERIOD_MS)) {
    if (!packet.err) {
      if (!dmxIsConnected) {
        Serial.println("DMX is connected!");
        dmxIsConnected = true;
        connectedActionMillis = currentMillis; 
        memset(dmx_render_buffer, 0, sizeof(dmx_render_buffer)); 
        // Ensures only graph data is reset upon reconnection
      }

      dmx_read(dmxPort, data, packet.size);

      if (packet.size > 0 && packet.size <= DMX_PACKET_SIZE) {
        memcpy(dmx_render_buffer, data, packet.size);
      }

      if (currentMillis - lastUpdate > 1000) {
        Serial.printf("Start code is 0x%02X and slot 1 is 0x%02X\n", dmx_render_buffer[0], dmx_render_buffer[1]);
        lastUpdate = currentMillis;
      }
    } else {
      Serial.println("A DMX error occurred.");
    }
  } else {
    // Handling a DMX timeout (disconnection)
    // If no data is received for 35 ms or longer, this section is executed immediately, and the status switches to flashing red instantly
    if (dmxIsConnected) {
      Serial.println("DMX was disconnected. Resetting driver...");
      dmxIsConnected = false;
      dmx_driver_delete(dmxPort);
      initDMXDriver(); 
    }
    memset(data, 0, sizeof(data));
    memset(dmx_render_buffer, 0, sizeof(dmx_render_buffer));
  }

  // ==================== Blink Control Timer ====================
  if (currentMillis - lastBlinkMillis >= BLINK_INTERVAL_MS) {
    blinkState = !blinkState; 
    lastBlinkMillis = currentMillis;
  }

  // ==================== Screen Rendering ====================
  buf.clear(TFT_BLACK);

  // 1. Draw the indicator area (X: 515–639, Y: 0–47)
  int inner_x = 515 + 5;
  int inner_y = 0 + 5;
  int inner_w = (639 - 515) - 10;
  int inner_h = 48 - 10;

  uint16_t boxColor = TFT_BLACK; 
  if (blinkState) {
    boxColor = dmxIsConnected ? TFT_GREEN : TFT_RED;
  }

  // Consolidated the accidentally duplicated extra drawing lines into a single line
  buf.fillRect(inner_x, inner_y, inner_w, inner_h, boxColor);

  // 2. Always-on status text
  buf.setTextSize(1);
  buf.setTextColor(TFT_WHITE, boxColor); 
  buf.setTextDatum(textdatum_t::middle_center);

  int center_x = inner_x + (inner_w / 2);
  int center_y = inner_y + (inner_h / 2);

  if (dmxIsConnected) {
    buf.drawString("DMX signal drawing", center_x, center_y);
  } else {
    buf.drawString("DMX not connected", center_x, center_y);
  }

  // ★ White border lines (guide lines) are “always drawn”
  // [X = 1] White line between the start code (0) and channel 1 (2)

  buf.drawFastVLine(1, 0, 48, TFT_WHITE);

  // [X = 514] White line drawn immediately after finishing drawing channel 512 (X=513)
  buf.drawFastVLine(514, 0, 48, TFT_WHITE);

  // 3. Check if DMX data is being plotted
  bool shouldDrawGraph = dmxIsConnected && (currentMillis - connectedActionMillis >= GRAPH_DELAY_MS);

  if (shouldDrawGraph) {
    // [Start graph display] Normal drawing
    // [X = 0] Plot the start code
    int raw_sc = dmx_render_buffer[0];
    int h_sc = (raw_sc * 48) / 255; 
    if (h_sc > 0) {
      buf.drawFastVLine(0, 48 - h_sc, h_sc, TFT_GREEN);
    }

    // [X = 2 to 513] Continuous plotting of channels 1 through 512

    for (int ch = 1; ch <= 512; ch++) {
      int x_pos = ch + 1; 
      int raw_val = dmx_render_buffer[ch];

      int h_ch = 0;
      if (raw_val > 0) {
        if (raw_val == 255) {
          h_ch = 48;
        } else {
          h_ch = 1 + ((raw_val - 1) * 46) / 253; 
        }
      }

      if (h_ch > 0) {
        buf.drawFastVLine(x_pos, 48 - h_ch, h_ch, TFT_GREEN);
      }
    }
  } else if (dmxIsConnected) {
    // Display “Analyzing Data ...” only during the delay period (data buffering) immediately after reconnection

    buf.setTextSize(1);
    buf.setTextColor(TFT_YELLOW, TFT_BLACK); 
    buf.setTextDatum(textdatum_t::middle_center);

    int graph_center_x = 514 / 2;
    int graph_center_y = 48 / 2;

    buf.drawString("Analyzing Data ...", graph_center_x, graph_center_y);
  }

    // 4. Transfer the buffer to the LCD
  lcd_buffer_write();

  delay(1);
}

System Integration


Final Project Task List

category task description status
device 1: input & output unit testing for all input components (fader, switch, encoder) done
verification of dmx signal output done
enclosure 3d printing done
pcb design and final circuit fabrication done
final assembly and component integration done
device 2: monitoring basic dmx input signal verification done
tft/lcd monitor functional testing done
development of 512ch bar graph rendering engine done
enclosure design and fabrication done
circuit fabrication including dmx thru port done
device 3: led output basic dmx input signal verification done
individual neopixel strip illumination test done
implementation of dmx-to-led mapping logic done
enclosure design and fabrication done
final circuit fabrication and assembly done
common / review full system integration and stress testing done
graded review meeting with instructors done
final documentation and video demonstration done

Final Project Timeline

gantt
    title Final Project Timeline (Updated: May 12)
    dateFormat  YYYY-MM-DD
    axisFormat  %m/%d
    tickInterval 1week

    section Device 1: I/O
    Unit Testing (Inputs/DMX)    :done, d1_1, 2024-04-15, 10d
    Enclosure 3D Print          :done, d1_2, 2024-04-25, 3d
    PCB Design & Fabrication     :active, d1_3, 2024-04-28, 10d
    Final Assembly               :d1_4, after d1_3, 5d

    section Device 2: Monitor
    DMX Input Verification       :done, d2_1, 2024-04-20, 5d
    TFT/LCD Functional Test      :active, d2_2, 2024-05-10, 4d
    Rendering Engine Dev         :d2_3, after d2_2, 7d
    Enclosure & Circuit Build    :d2_4, after d2_3, 7d

    section Device 3: LED
    DMX & NeoPixel Basic Test    :done, d3_1, 2024-04-25, 5d
    DMX-to-LED Mapping Logic     :done, d3_2, 2024-05-01, 7d
    Enclosure Design & Fab       :active, d3_3, 2024-05-08, 6d
    Final Circuit & Assembly     :d3_4, after d3_3, 5d

    section Common / Review
    System Integration Test      :crit, 2024-05-22, 5d
    Graded Review (Scheduled)    :milestone, 2024-05-28, 0d
    Documentation & Video Demo   :2024-05-25, 6d
    Project Completion           :milestone, 2024-05-31, 0d

Final project summary slide

Final project video clip

Design Files

Please see the Final Project page.