Python-based linkage lamp effect simulation system

The Python-based LED animation simulation system addresses the inefficiencies of manual coding and hardware-dependent debugging in LED control by providing a GUI for real-time visualization and automated code conversion, improving development efficiency and reducing hardware testing time.

CN120318378APending Publication Date: 2025-07-15SHENZHEN XINZHONGXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510484119.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

The development of existing LED lighting effects is difficult, complex debugging and lack of visual preview, resulting in low development efficiency and requires frequent debugging on hardware.

Method used

It provides a Python-based LED simulation system, including LED animation design and debugging module, data processing and optimization module, light strip management module, animation mode control module, visual simulation module, embedded code conversion module and real-time preview module, and realize LED lighting effect simulation through the GUI interface and automatically generate embedded code.

Benefits of technology

It improves the efficiency of LED lighting effects development, realizes real-time preview of animation effects in the software environment, reduces hardware debugging time, supports multi-channel lighting control, is compatible with different types of LED lighting effects modes, and is suitable for Windows, macOS and Linux platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318378A_ABST
    Figure CN120318378A_ABST
Patent Text Reader

Abstract

The invention provides a Python linkage-based lamp effect simulation system, and belongs to the field of LED animation simulation. Comprising an LED animation design and debugging module, an LED data processing and optimization module, an intelligent data processing and optimization mechanism module, an LED light bar management module, an animation mode control module, a stage animation management module, a visual LED real-time simulation module, a visual adjustment module, an embedded code conversion module and a C language data import module. A real-time preview module and a mode customizing module. According to the system provided by the invention, the problems of difficulty in LED lamp efficiency development, complexity in debugging and lack of visual preview are solved, and the Python-based LED animation simulation and data conversion system is provided. According to the system, a visual GUI interface is provided through PyQt5, real-time simulation of the LED lamp effect is supported, available C language data of embedded equipment can be automatically generated, and the LED animation design and development efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of intelligent lighting control, embedded system development, LED animation simulation, and automated data conversion, and particularly relates to a Python-based linked light effect simulation system. Background Art

[0002] With the development of industries such as intelligent lighting, stage lighting, and LED displays, the demand for the design, simulation, and rapid hardware adaptation of LED animation modes is continuously increasing. The existing technology is that many LED control systems require manual writing of C language code and control the brightness, color, and dynamic modes of LED lights through an MCU (such as STM32, ESP32). This method has a long development cycle, is not easy to debug, and it is difficult to preview the LED effects in real time. Moreover, there are few existing LED animation design software. Developers usually need to debug on physical hardware, with low efficiency and inconvenient modification. Developers cannot preview the animation effects in a software environment and need to rely on real LED lights for debugging. The disadvantages are: low development efficiency: The development of traditional LED animations requires repeated modification of C code and burning it into an embedded device for testing, which is a cumbersome and time-consuming process. Lack of visual preview: Developers cannot preview the animation effects in a software environment and need to rely on real LED lights for debugging.

[0003] Therefore, there is an urgent need in this field for a technical solution that can solve the problems of difficult development, complex debugging, and lack of visual preview of LED lights.

[0004] The information disclosed in this background art section is only intended to enhance the overall understanding of the present invention and should not be regarded as an admission or any form of implication that this information constitutes prior art already known to those of ordinary skill in the art. Summary of the Invention

[0005] The object of the present invention is to provide a system that can solve the problems of difficult development, complex debugging, and lack of visual preview of LED light effects.

[0006] To achieve the above object, the present invention provides the following solution:

[0007] A Python-based linked light effect simulation system, comprising:

[0008] An LED animation design and debugging module, used to simulate LED lighting effects through a GUI interface and adjust mode parameters;

[0009] An LED data processing and optimization module, used for data filtering, brightness adjustment, and color modification;

[0010] An intelligent data processing and optimization mechanism module, used for deeply adjusting LED animation data to ensure smooth and uniform lighting effects;

[0011] The LED strip management module is used to encapsulate the LED strip components and achieve segmented lighting, color gradient, and switch control of the LEDs.

[0012] The animation mode control module is used to provide different LED animation modes.

[0013] The stage animation management module is used to manage the combined animations of multiple strips and control the synchronous changes of the LED strips.

[0014] The visual LED real-time simulation module is used to implement visual LED real-time simulation and intuitively view different lighting modes.

[0015] The visual adjustment module is used to modify the number of LED beads, color, brightness, and animation speed to make the simulation effect closer to the actual hardware application.

[0016] The embedded code conversion module is used to convert the simulation data into the C language format.

[0017] The C language data import module is used to simulate LED animations.

[0018] The real-time preview module is used to simulate the display effects under different LED configurations and reduce the hardware debugging time.

[0019] The mode customization module can manually modify the LED mode data through the array editing function to adapt to different hardware requirements and ensure the best lighting effect experience.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] The Python-based linked lighting effect simulation system provided by the present invention includes: an LED animation design and debugging module, an LED data processing and optimization module, an intelligent data processing and optimization mechanism module, an LED strip management module, an animation mode control module, a stage animation management module, a visual LED real-time simulation module, a visual adjustment module, an embedded code conversion module, a C language data import module, a real-time preview module, and a mode customization module. The present invention can improve the development efficiency: with an intuitive GUI interface, LED lighting effects can be generated without writing C code by hand. Using Python + PyQt5, it supports rapid adjustment of animation parameters and saves debugging time. Visual simulation allows real-time preview of LED animation effects in a software environment, avoiding frequent hardware debugging by burning. It is compatible with different types of LED lighting effect modes and provides multi-channel lighting control. Embedded code is automatically generated without manual data format conversion, and the system automatically generates C language arrays that can be directly used for MCU development such as STM32 and ESP32. It has strong compatibility and is applicable to Windows, macOS, and Linux for cross-platform use. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0023] Figure 1 It is a schematic diagram of the system structure provided by the embodiment of the present invention.

[0024] Figure 2 It is a schematic diagram of the download page provided by the embodiment of the present invention.

[0025] Figure 3 It is a schematic diagram of the animation mode required to cancel the annotation provided by the embodiment of the present invention.

[0026] Figure 4 It is a schematic diagram of the neon light flow effect provided by the embodiment of the present invention.

[0027] Figure 5 It is a schematic diagram of the light effect of the symmetric bounce mode provided by the embodiment of the present invention.

[0028] Figure 6 It is a schematic diagram of the cyclic gradient light effect provided by the embodiment of the present invention.

[0029] Figure 7 It is a schematic diagram of monochromatic switching provided by the embodiment of the present invention.

[0030] Figure 8 It is a schematic diagram of the trimming mode provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0032] The object of the present invention is to provide a system that can solve the problems of difficult LED light effect development, complex debugging, and lack of visual preview.

[0033] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the drawings and specific embodiments.

[0034] Embodiment 1:

[0035] This embodiment provides a Python-based linked light effect simulation system, including:

[0036] An LED animation design and debugging module, used to simulate LED lighting effects through a GUI interface and adjust mode parameters;

[0037] An LED data processing and optimization module, used for data filtering, brightness adjustment, and color modification;

[0038] An intelligent data processing and optimization mechanism module, used for in-depth adjustment of LED animation data to ensure smooth and uniform lighting effects;

[0039] An LED strip management module, used to encapsulate LED strip components and achieve segmented lighting, color gradient, and switch control of LEDs;

[0040] An animation mode control module, used to provide different LED animation modes;

[0041] A stage animation management module, used to manage the combined animations of multiple light strips and control the synchronous changes of LED strips;

[0042] A visual LED real-time simulation module, used to implement visual LED real-time simulation and intuitively view different lighting modes;

[0043] A visual adjustment module, used to modify the number of lamp beads, color, brightness, and animation speed to make the simulation effect closer to actual hardware applications;

[0044] An embedded code conversion module, used to convert simulation data into the C language format;

[0045] A C language data import module, used to simulate LED animations;

[0046] A real-time preview module, used to simulate the display effects under different LED configurations and reduce the hardware debugging time.

[0047] A mode customization module, which can manually modify LED mode data through an array editing function to adapt to different hardware requirements and ensure the best lighting effect experience.

[0048] This embodiment provides a complete user guide for a Python-based LED simulation and hardware driver development system, introducing in detail its functions, installation methods, usage methods, and how to import LED data in C language format to generate corresponding simulation models for embedded devices, aiming to improve project efficiency.

[0049] The system provided in this embodiment refers to a Python-based LED simulation and hardware driver development system.

[0050] The user refers to those who hope to design and simulate LED animation driving code, including embedded engineers, lighting designers, etc.

[0051] This system is used for the visual simulation of LED animation modes, and can automatically convert data formats to adapt to the needs of embedded development. Its main uses include:

[0052] LED animation design and debugging: Simulate the LED lighting effects through the GUI interface and adjust the mode parameters.

[0053] LED data processing and optimization: Support operations such as data filtering, brightness adjustment, color modification, etc.

[0054] Import C language data to simulate the corresponding LED animation, suitable for embedded development.

[0055] Real-time preview function: Can simulate the display effects under different LED configurations, reducing the hardware debugging time.

[0056] System functions and features:

[0057] Visual simulation: Based on PyQt5, provides an intuitive GUI interface to achieve real-time preview of LED animation.

[0058] Multiple animation modes: Support various stage lighting effects.

[0059] Automatically generate simulation through input parameters: The Python program can simulate the corresponding LED animation according to the input LED configuration, adapting to the AiROHA AB1562E platform.

[0060] Parameters adjustable: Support modifying parameters such as the number of LED beads, color, animation speed, etc.

[0061] Cross-platform support: Compatible with Windows, macOS, and Linux for easy use.

[0062] Programming language: Python;

[0063] Integrated development environment: PyCharm 2020;

[0064] Graphical interface: PyQt5;

[0065] Data processing: NumPy;

[0066] C code generation: Python file conversion module.

[0067] Operating environment:

[0068] (1) Hardware environment:

[0069] Minimum requirements: Processor: Intel Pentium III / AMD Athlon or equivalent.

[0070] Memory: 512MB RAM;

[0071] Hard disk: 512MB of free hard disk space;

[0072] Video card: High-color display adapter with a resolution of 1024×768;

[0073] Recommended configuration:

[0074] Processor: Intel Pentium 4 / AMD Athlon XP or higher-level processor.

[0075] Memory: 1GB RAM.

[0076] Hard disk: 1GB of free hard disk space.

[0077] Video card: High-color display adapter supporting a resolution of 1024×768 or higher.

[0078] (2) Software environment:

[0079] Operating system: Windows 10 / macOS10.14 / Ubuntu 18.04 or higher.

[0080] Python version: Python 3.9 or higher.

[0081] Dependency libraries: PyQt5, NumPy.

[0082] System installation:

[0083] (1) Install Python:

[0084] Download the appropriate version from the Python official website as Figure 2 shown in the software and install it.

[0085] Ensure that pip is available and add the Python directory to the environment variables.

[0086] (2) Install dependency libraries:

[0087] Open the terminal (PowerShell for Windows / Terminal for macOS & Linux), and enter: pip install PyQt5 numpy.

[0088] Software functions:

[0089] (1) LED animation simulation:

[0090] This system supports real-time simulation based on preset LED light effects. Users can visually view different lighting modes on the interface, such as running lights, breathing lights, gradient lights, marquee lights, etc. The system provides a visualization adjustment function that allows users to modify the number of LED beads, color, brightness, and animation speed, making the simulation effect closer to actual hardware applications.

[0091] (2) Data Processing and Optimization:

[0092] The system has a built-in intelligent data processing and optimization mechanism that can deeply adjust LED animation data to ensure smooth and uniform lighting effects. The main optimization functions include:

[0093] Brightness Filtering: Automatically eliminates low-brightness points, enhancing the visibility and contrast of the lights.

[0094] Gradient Optimization: Adjusts the smoothness of LED color transformation to avoid abrupt brightness or color transitions.

[0095] Mode Customization: Users can manually modify the LED mode data through the array editing function to adapt to different hardware requirements and ensure the best lighting effect experience.

[0096] (3) LED Animation Mode Usage Guide:

[0097] This system has preset multiple LED animation modes. Users can enable or disable these modes according to their needs for visual preview on the simulation interface. The following are the descriptions and usage methods of various animation modes. When enabling the LED preset animation, all preset LED animation modes are disabled by default. Users can manually uncomment the relevant code to enable the required animation mode.

[0098] ① Enabling Preset Animations in the Code:

[0099] A: Open the main.py file;

[0100] B: Find the code area related to self.stage (usually in the __init__() method of the MainWindow class).

[0101] C: Uncomment the required animation mode, as Figure 3 shown.

[0102] D: Run the program to view the corresponding animation effect in the LED simulation interface.

[0103] ② Explanation of Preset LED Animation Modes:

[0104] The following are some of the system-built LED animation modes intercepted. Users can select the appropriate mode according to their needs:

[0105] A: Neon series (neon light effect):

[0106] self.stage.stage_pattern_neon_m2c2() - Neon light flowing effect.

[0107] self.stage.stage_pattern_neon_m2c2_extend() - Extended version of neon light effect.

[0108] self.stage.stage_pattern_neon_m3c1() - Single - light neon flowing mode.

[0109] Features:

[0110] Neon light flowing effect, suitable for application scenarios such as decorative lamp tubes and billboards.

[0111] The flowing speed and light color can be adjusted to form different styles of light effects.

[0112] The effect is as Figure 4 shown.

[0113] B: Bounce series (bouncing light effect):

[0114] self.stage.stage_pattern_bounce_m2c2_m3c4() - Symmetric bouncing mode.

[0115] self.stage.stage_pattern_bounce_m3c3() - Uniform bouncing mode.

[0116] self.stage.stage_pattern_bounce_ball() - Simulating the effect of a bouncing ball.

[0117] self.stage.stage_pattern_bounce_m3c3_extend() - Enhanced bouncing mode. Features:

[0118] The LED lights move in a bouncing form, simulating the effect of a small ball bouncing.

[0119] Suitable for scenarios such as music rhythm lights and interactive lighting installations.

[0120] Adapts to different numbers of channels (2 - channel, 3 - channel, etc.), providing more variations.

[0121] The effect is as Figure 5 shown.

[0122] C: Loop series (loop fade):

[0123] self.stage.stage_pattern_loop_m2() - Loop fade.

[0124] self.stage.stage_pattern_loop_m3c1() - Monochromatic loop.

[0125] self.stage.stage_pattern_loop_m3c2() - Bicolor fade.

[0126] self.stage.stage_pattern_loop_m1() - Color loop.

[0127] Features:

[0128] The LED color loops and changes, creating a smooth transition lighting effect.

[0129] Suitable for ambient lighting, gradient background lights.

[0130] The effect is as Figure 6 shown.

[0131] D: Switch series (switch animation):

[0132] self.stage.stage_pattern_switch_m3c1() - Monochromatic switch.

[0133] self.stage.stage_pattern_switch_m3c4() - Loop switch.

[0134] self.stage.stage_pattern_switch_c_m3c4() - Enhanced color switch.

[0135] Features:

[0136] The LED alternates between different colors or channels, forming a flashing effect.

[0137] Suitable for warning lights, signal lights, rhythm lights.

[0138] The effect is as Figure 7 shown.

[0139] E: Trim series (trim mode):

[0140] self.stage.stage_pattern_trim_m3c1() - Trim mode 1.

[0141] self.stage.stage_pattern_trim_m2c1() - Pruning mode 2.

[0142] self.stage.stage_pattern_trim_m3c2() - Pruning mode 3.

[0143] self.stage.stage_pattern_trim_m4() - Pruning mode 4.

[0144] Features:

[0145] Applicable to specific LED hardware layouts to make the lighting effect more uniform.

[0146] The effect is as Figure 8 shown.

[0147] ③ Custom LED animations:

[0148] In addition to the system - preset LED animation modes, users can also create their own LED animations:

[0149] In the pyqt_pattern_stage.py file, add a new animation function, for example:

[0150] def stage_pattern_custom(self):# Write the new LED animation logic here

[0151] Call this function in main.py: self.stage.stage_pattern_custom()

[0152] Run the program to view the custom animation effect!

[0153] The Python - based linked lighting effect simulation system provided by this embodiment solves the problems of difficult LED lighting effect development, complex debugging, and lack of visual preview, and provides a Python - based LED animation simulation and data conversion system. This system provides an intuitive GUI interface through PyQt5, supports real - time simulation of LED lighting effects, and can automatically generate C - language data available for embedded devices, greatly improving the efficiency of LED animation design and development.

[0154] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and reference can be made to the method part for the relevant parts.

[0155] In this text, specific examples are used to elaborate on the principles and implementation modes of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation modes and application scopes. To sum up, the content of this specification should not be construed as a limitation on the present invention.

Claims

1. A Python-based linked light effect simulation system, characterized in that, Including: The LED animation design and debugging module is used to simulate the LED lighting effects through the GUI interface and adjust the mode parameters; The LED data processing and optimization module is used for data filtering, brightness adjustment and color modification; The intelligent data processing and optimization mechanism module is used to deeply adjust the LED animation data to ensure smooth and uniform lighting effects; The LED strip management module is used to encapsulate the LED strip components and achieve segmented lighting, color gradient and switch control of the LED; The animation mode control module is used to provide different LED animation modes; The stage animation management module is used to manage the combined animations of multiple light strips and control the synchronous changes of the LED light strips; The visual LED real-time simulation module is used to realize the visual LED real-time simulation and intuitively view different lighting modes; The visual adjustment module is used to modify the number of lamp beads, color, brightness and animation speed to make the simulation effect closer to the actual hardware application; The embedded code conversion module is used to convert the simulation data into the C language format; The C language data import module is used to simulate the LED animation; The real-time preview module is used to simulate the display effects under different LED configurations and reduce the hardware debugging time. The mode customization module can manually modify the LED mode data through the array editing function to adapt to different hardware requirements and ensure the best lighting effect experience.