Embedded device graphical programming method, storage medium, program product and device

By embedding a graphical hardware programming environment in a browser and using wireless communication methods, the problems of unfriendly embedded system development tools for beginners and platform limitations are solved, enabling efficient and compatible embedded hardware development.

CN120848863APending Publication Date: 2025-10-28SHANGHAI JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510846786.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing embedded system development tools are not friendly to beginners and cross-domain developers, with low hardware development efficiency, poor compatibility, and upload and debugging methods limited by the development environment platform.

Method used

Provided is a graphical programming method for embedded devices, which embeds the embedded hardware graphical programming development environment into the browser, connects to the embedded device through wireless communication, drags and drops graphic blocks to form hardware control logic, and uploads control code through wireless communication.

Benefits of technology

It simplifies the embedded hardware development process, lowers the barrier to entry for beginners and cross-disciplinary developers, improves development efficiency and compatibility, and solves the problems of low hardware development efficiency and limited debugging methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848863A_ABST
    Figure CN120848863A_ABST
Patent Text Reader

Abstract

The invention provides an embedded equipment graphical programming method, a storage medium, a program product and equipment, and the method comprises the steps: embedding a development environment of embedded hardware graphical programming into a browser in a plug-in form, and displaying the development environment through a page; establishing a wireless communication link between the development environment of the embedded hardware graphical programming and the embedded device to be developed through a wireless communication mode; the graphic blocks are dragged and spliced in a graphic programming interface of the embedded device to form hardware control logic, and control codes for achieving the hardware control logic are correspondingly generated based on the topological relation between the graphic blocks and the corresponding function codes; and uploading the control code to the to-be-developed embedded device through the wireless communication link, and sending a debugging instruction to control the to-be-developed embedded device to debug. The technical problems that an existing embedded system is low in hardware development efficiency and poor in compatibility, and an uploading and debugging method is limited by a development environment platform are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embedded system development technology, and in particular to the field of graphical programming technology for embedded devices. Background Technology

[0002] Traditional development of ESP32 series microcontrollers typically requires the use of the official software development environment, which heavily relies on C / C++, has relatively strict syntax, and generates a large amount of code, making it difficult for beginners to quickly get started. While MicroPython offers significant syntax optimization, it is largely separated from the hardware abstraction layer, requiring users to be familiar with low-level hardware protocols (such as I2C, SPI, UART, CAN, etc.) and protocol stack control (such as Bluetooth, 2.4GHz wireless communication). Furthermore, a certain level of understanding of sensor operating principles and the methods and processes for acquiring, collecting, and parsing data is also necessary, making it extremely unfriendly to beginners and developers from other fields. In addition, existing graphical programming software, such as Mixly, only natively supports a limited number of microcontroller models, and only supports a few simple models of sensors and external devices.

[0003] Application content

[0004] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a graphical programming method, storage medium, program product and device for embedded devices, in order to solve the technical problems of low hardware development efficiency, poor compatibility and limitations of the development environment platform on the upload and debugging methods in the prior art.

[0005] To achieve the above and other related objectives, this application provides a graphical programming method for embedded devices. The method includes: embedding an embedded hardware graphical programming development environment into a browser as a plugin, and displaying the embedded device graphical programming interface on a page; establishing a wireless communication link between the embedded hardware graphical programming development environment and the embedded device to be developed via wireless communication; pre-configuring the topological relationships between graphical blocks and functional codes of various functional modules of the embedded device; forming hardware control logic by dragging and assembling the graphical blocks in the embedded device graphical programming interface; generating control code to implement the hardware control logic in the embedded device graphical programming interface based on the topological relationships between the graphical blocks and corresponding functional codes; uploading the control code to the embedded device to be developed via the wireless communication link, and sending debugging commands to control the embedded device to be developed for debugging.

[0006] In one embodiment of this application, the functional module includes multiple sensors, a display control module, a peripheral driver module, an artificial intelligence application module, and a communication module.

[0007] In one embodiment of this application, the sensor includes any or more of the following: a color sensor, a carbon dioxide sensor, a non-contact temperature sensor, a piezoelectric weighing sensor, a water quality detection sensor, and a gesture recognition sensor; the display control module includes any or more of the following: a TFT display screen, an industrial serial port screen, a digital tube screen, and an LVGL-based human-machine interface using MicroPython; the peripheral drive module includes any or more of the following: a multi-channel audio acquisition module, an audio codec module, a multi-channel motor drive module, and an IO expander; the artificial intelligence application module includes any or more of the following: an offline speech recognition module, an offline speech synthesis module, an AI vision module, and an image recognition module; and the communication module includes a Bluetooth mode module and / or a radio frequency identification module.

[0008] In one embodiment of this application, the embedded device to be developed has a built-in update program module for receiving the control code dynamically generated by the development environment of the embedded hardware graphical programming and updating the control code into the embedded device to be developed.

[0009] In one embodiment of this application, in response to receiving an upload command, the control code is uploaded to the embedded device to be developed via the wireless communication link by calling a JavaScript library related to controlling the wireless communication link.

[0010] In one embodiment of this application, when establishing the wireless communication link, the method further includes sending the ID of the embedded device to be developed to the development environment of the embedded hardware graphical programming.

[0011] In one embodiment of this application, before uploading the control code to the embedded device to be developed via the wireless communication link, the control code is further subjected to multi-level encapsulation.

[0012] To achieve the above and other related objectives, this application also provides an electronic terminal, comprising: a memory for storing a computer program; and a processor for running the computer program to implement the steps of the embedded device graphical programming method as described above.

[0013] To achieve the above and other related objectives, this application also provides a computer storage medium storing program instructions, which, when executed, implement the steps of the embedded device graphical programming method described above.

[0014] To achieve the above and other related objectives, this application also provides a computer program product, characterized in that the computer program product includes computer program code, which, when run on a computer, causes the computer to implement the method described above.

[0015] As described above, the embedded device graphical programming method, storage medium, program product, and device of this application have the following characteristics:

[0016] Beneficial effects:

[0017] This application significantly reduces the number of graphical blocks required when controlling embedded devices, simplifies the control logic method, improves the efficiency of graphical embedded development, lowers the usage threshold for novice developers and cross-domain developers, and effectively solves the technical problems of low hardware development efficiency, poor compatibility, and limitations of development environment platform on upload debugging methods in existing technologies. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 The diagram shows the principle flow of a graphical programming method for embedded devices according to an embodiment of this application.

[0020] Figure 2 The diagram shown is a schematic diagram of generating control code in a graphical programming method for embedded devices according to an embodiment of this application;

[0021] Figures 3 to 12 The diagram shows a partial application example of the graphical programming method for embedded devices in one embodiment of this application.

[0022] Figure 13 The diagram shown is a schematic block diagram of an electronic terminal according to an embodiment of this application. Detailed Implementation

[0023] The following specific examples illustrate the implementation of this embodiment. Those skilled in the art can easily understand other advantages and effects of this embodiment from the content disclosed in this specification. This embodiment can also be implemented or applied through other different specific implementation methods, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this embodiment. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0024] In existing technologies, different embedded devices may use different hardware protocols to acquire data (such as I2C, SPI, etc.), and the working principles of sensors may also be very different (such as piezoelectric effect, photoelectric effect, etc.). It is necessary to consult and learn a certain level of knowledge in advance before debugging and writing device drivers. The most important point is that for hardware debugging, because the communication and data acquisition process is highly abstract and the problem cannot be found directly, it is generally necessary to use professional instruments and equipment (such as oscilloscopes, logic analyzers, etc.), which leads to low efficiency and error-prone hardware development.

[0025] While mainstream development tools (Arduino IDE, Thonny, PlatformIO, etc.) have improved development efficiency to some extent in terms of syntax and development ecosystem, they lack graphical programming support for hardware interaction, making it difficult to intuitively build control logic.

[0026] While the official Mixly software provided by the controller supports graphical programming, it primarily targets simple controllers and sensors. It doesn't cover many development boards equipped with the ESP32 series (ESP32, ESP32-S3, etc.), nor does it cover newer sensors (such as the SGP30 CO2 sensor, MLX90614 non-contact temperature sensor, AI vision camera, etc.) or new and practical peripherals (offline voice processing, digital audio amplifiers, etc.). Graphical support for complex peripherals (such as dynamic rendering on a TFT high-definition color screen, multi-motor collaborative control, etc.) is lacking, requiring users to learn and write low-level hardware code. Furthermore, it lacks graphical support for specific scenario-based case templates.

[0027] Current graphical programming software uses wired USB, USB-to-serial, or emulator connections to upload programs to hardware platforms. Because of the wired connection, the hardware platform's movement is limited during debugging and uploading, which is cumbersome for applications such as small cars and drones. Furthermore, requiring devices other than the development platform hardware to connect and control the device presents another problem: special devices like serial ports and emulators require driver support from the development environment's operating system; without it, they cannot be used.

[0028] Furthermore, existing graphical programming software mainly relies on installation packages, which increases the additional hardware and software requirements for cross-platform applications (such as Windows systems and various Linux distributions) and some systems that are relatively unfriendly to hardware development (such as macOS and iOS) when preparing the development environment.

[0029] This embodiment provides a graphical programming method, storage medium, program product, and device for embedded devices, which addresses the technical problems of low hardware development efficiency, poor compatibility, and limitations of the development environment platform on the upload and debugging methods in existing technologies.

[0030] This embodiment relates to a graphical programming method for embedded devices that is independent of the development environment's operating system and hardware platform. It provides a graphical programming plugin for embedded devices embedded in a browser. This plugin is designed for microcontrollers (MCUs), such as ESP32 and ESP32-S3. Under the MicroPython programming environment, it encapsulates the driving logic for various sensor data acquisition (such as DHT11, SGP30, MLX90614, PAJ7620, etc.) and control peripherals (such as IPS TFT displays, DC motor drivers, digital audio amplifiers, I / O expanders, etc.) through a highly integrated custom graphical programming module. The plugin provided in this embodiment aims to simplify the development process of IoT devices and various sensors and actuators, lower the barrier to embedded programming, and is suitable for the rapid development of controller development boards in scenarios such as education, smart homes, and industrial automation.

[0031] The following will describe in detail the principles and implementation methods of the embedded device graphical programming method, storage medium, program product and device of this embodiment, so that those skilled in the art can understand the embedded device graphical programming method, storage medium, program product and device of this embodiment without creative effort.

[0032] This embodiment provides a graphical programming method for embedded devices. Figure 1 The diagram shows an overall flowchart of an embedded device graphical programming method according to an embodiment of this application; as shown below. Figure 1 As shown, the method includes the following steps S100 to S400.

[0033] Step S100: The development environment for embedded hardware graphical programming is embedded into the browser as a plug-in, and the graphical programming interface of the embedded device is displayed on the page.

[0034] Step S200: Establish a wireless communication link between the embedded hardware graphical programming development environment and the embedded device to be developed via wireless communication.

[0035] Step S300: Pre-configure the topological relationship between the graphical blocks and functional codes of various functional modules of the embedded device; in the graphical programming interface of the embedded device, form hardware control logic by dragging and splicing the graphical blocks; and generate control code to implement the hardware control logic in the graphical programming interface of the embedded device based on the topological relationship between the graphical blocks and the corresponding functional codes.

[0036] Step S400: Upload the control code to the embedded device to be developed via the wireless communication link, and send debugging instructions to control the embedded device to be developed for debugging.

[0037] This embodiment provides a method for graphical programming and uploading debugging of embedded devices that is independent of the development environment's operating system and hardware platform. It also provides support for various external hardware devices in embedded graphical programming development, which can solve the problems mentioned in the prior art, such as low hardware development efficiency, poor compatibility, and limitations of the development environment platform on the uploading debugging method.

[0038] The following provides a detailed description of steps S100 and S400 in the embedded device graphical programming method of this embodiment.

[0039] Step S100: The development environment for embedded hardware graphical programming is embedded into the browser as a plug-in, and the graphical programming interface for the embedded device is displayed on the page.

[0040] In this embodiment, for example, a desktop application framework built using languages ​​such as JavaScript and HTML, specifically JavaScript, HTML, and CSS, transfers the development environment for graphical programming of embedded hardware to a browser. The program required for the embedded device under development can be uploaded, debugged, and run wirelessly (via WiFi, etc.), thus eliminating the limitations of the development environment's hardware and software platform.

[0041] Step S200: Establish a wireless communication link between the embedded hardware graphical programming development environment and the embedded device to be developed via wireless communication.

[0042] The wireless communication link can be a Bluetooth, WiFi, or other wireless communication link.

[0043] In one implementation of this embodiment, when establishing the wireless communication link, the method further includes sending the ID of the embedded device to be developed to the development environment for embedded hardware graphical programming.

[0044] If multiple embedded devices require program updates, to ensure communication while also distinguishing between them, a unique identifier for each embedded device is added when the wireless communication link is established. For example, if the chip ID in the main chip of the device under development is unique, and WiFi wireless communication is used, this unique ID can be added to the name of the connection hotspot to distinguish different embedded devices.

[0045] Step S300: Pre-configure the topological relationship between the graphical blocks and functional codes of various functional modules of the embedded device. In the graphical programming interface of the embedded device, hardware control logic is formed by dragging and splicing the graphical blocks. Based on the topological relationship between the graphical blocks and the corresponding functional codes, control code that implements the hardware control logic is generated in the graphical programming interface of the embedded device.

[0046] In one implementation of this embodiment, the functional module includes multiple sensors, a display control module, a peripheral driver module, an artificial intelligence application module, and a communication module.

[0047] In one implementation of this embodiment, the sensor includes any or more of the following: a color sensor, a carbon dioxide sensor, a non-contact temperature sensor, a piezoelectric weighing sensor, a water quality detection sensor, and a gesture recognition sensor; the display control module includes any or more of the following: a TFT display screen, an industrial serial port screen, a digital tube screen, and an LVGL-based human-machine interface using MicroPython; the peripheral drive module includes any or more of the following: a multi-channel audio acquisition module, an audio codec module, a multi-channel motor drive module, and an IO expander; the artificial intelligence application module includes any or more of the following: an offline speech recognition module, an offline speech synthesis module, an AI vision module, and an image recognition module; and the communication module includes a Bluetooth mode module and / or a radio frequency identification module.

[0048] Specifically, the sensors include, for example, the TCS34725 color sensor, the SGP30 carbon dioxide sensor, the MLX90614 non-contact temperature sensor, the HX711 piezoelectric load cell, the TDS water quality sensor, and the PAJ7620 gesture recognition sensor. The display control module includes, for example, a high-definition TFT display screen (ST7789, ILI9488 driver chips), an industrial serial port screen (a color screen that displays values ​​at predefined interface positions via serial communication), a digital tube screen (MAX7219, TM1680 driver chips), and an LVGL-based human-machine interface using MicroPython. The peripheral driver modules include, for example, a multi-channel audio acquisition module (ES7210 chip), an audio codec module (ES8311 chip), a multi-channel motor drive module (HR8833, YX75V18AM driver chips), and an IO expander (TCA9555 chip). Bluetooth mode modules and / or RFID modules such as Bluetooth Peripheral, Center, HID mode, RFID (PN532 chip), etc.

[0049] In this embodiment, at the Hardware Abstraction Layer (HAL), such as a MicroPython custom firmware based on the ESP32 series microcontroller, some complex device and interface drivers (such as TFT color screens using RGB and SPI interfaces, IO expanders using I2C interfaces, etc.) are rewritten to optimize control logic, timing, and interrupt response.

[0050] In this embodiment, sensor communication protocols (such as the I2C communication process of SGP30 and PAJ7620), peripheral hardware underlying communication protocols and control logic (such as the SPI communication process of TFT color screen) are encapsulated into reusable graphic blocks. Users can call them by dragging and assembling, completely shielding the underlying register operations.

[0051] In this embodiment, the graphical blocks of each functional module are converted into MicroPython code according to the topological relationship. By filling in simple parameters, the hardware initialization program is automatically inserted and executed to quickly configure the hardware device into a usable state. Then, by operating the graphical blocks that construct the control logic, the hardware is subjected to data acquisition, reading, writing, parsing and other operations, thereby realizing human-machine data interaction and completing the entire link.

[0052] Furthermore, in this embodiment, device scanning based on buses such as I2C can be performed. Different addresses can be configured when different sensors and peripherals communicate via I2C, automatically identifying the models of connected sensors and peripherals and loading different initialization and control logic codes. For example, if address 0x73 is detected, the corresponding initialization and control logic code for PAJ7620 will be loaded, reducing manual configuration of complex parameters and register operations.

[0053] To further adapt to specific application scenarios, some low-level driver and device driver code can be rewritten to simplify complex operations. Graphical blocks can be further simplified, and hardware interface wiring is also included, which can reduce the learning curve for beginners and cross-domain developers.

[0054] Figure 2 The diagram shown illustrates the generation of control code in a graphical programming method for embedded devices according to an embodiment of this application; as follows: Figure 2 As shown, for example, the AI ​​vision module is controlled through graphical blocks to obtain the resulting data. Figure 2 The left side of the canvas is the graphics block programming area, and the right side is the dynamic code generation area.

[0055] Step S400: Upload the control code to the embedded device to be developed via the wireless communication link, and send debugging instructions to control the embedded device to be developed for debugging.

[0056] The embedded device to be developed is, for example, a microcontroller. In one implementation of this embodiment, in response to receiving an upload command, the control code is uploaded to the embedded device to be developed via the wireless communication link by calling a JavaScript library related to controlling the wireless communication link.

[0057] In one implementation of this embodiment, before uploading the control code to the embedded device to be developed via the wireless communication link, the control code is further encapsulated at multiple levels.

[0058] In one implementation of this embodiment, the embedded device to be developed has a built-in update program module for receiving the control code dynamically generated by the development environment of the embedded hardware graphical programming and updating the control code into the embedded device to be developed.

[0059] In this embodiment, for example, the embedded device to be developed is programmed with customized MicroPython firmware via a serial port. The firmware has a built-in update program called BootLoader, whose main function is to receive dynamically generated code from the graphical programming environment and update it into the embedded device.

[0060] The graphical programming development environment is used by dragging graphical code blocks onto the canvas of the embedded device's graphical programming interface, and then assembling the blocks on the canvas according to the required functional logic to achieve the desired function. If the developer has a background in MicroPython programming, they can check whether the code generated in the dynamic code generation preview area conforms to the syntax of the MicroPython language and the target functional requirements; if the developer does not have a background in MicroPython programming, they can check whether the assembly of the graphical blocks meets the required functional requirements.

[0061] Operate the embedded device to be developed and run the BootLoader program. This can be done by pressing multiple buttons simultaneously or by storing flag configuration information in the development board's memory. The BootLoader update program will then be loaded. This program will create a communication link for updating the stored program within the device. This link can be a wireless communication method such as Bluetooth or WiFi. The user will be prompted to connect their graphical programming development environment (a computer, mobile phone, or tablet running Windows, Linux, iOS, etc.) to the update link created by the target embedded device, enabling communication between the graphical programming development environment and the device. If multiple embedded devices need to be updated, to ensure communication while distinguishing between them, a unique identifier for each embedded device must be added when establishing the link. For example, if the chip ID in the main chip of the device to be developed is unique, and WiFi is used, this unique ID can be added to the name of the connection hotspot to differentiate between devices.

[0062] After establishing a physical communication link between the graphical programming development environment platform and the embedded device to be developed, clicking the upload button in the graphical development environment allows the graphical programming software to send the code generated by the graphical blocks to the embedded device that has entered the BootLoader program by calling JavaScript libraries related to controlling the wireless communication link. This process requires accurate and stable transmission, necessitating mechanisms to enhance reliability. For example, when using WiFi wireless communication, the WebSocket library provided by JavaScript can be used to control the established WiFi wireless communication link. The MicroPython code dynamically generated by the graphical blocks can be sent message by message via TCP connection to update the program in the embedded device, thus completing the replacement. Setting an appropriate timeout and retransmission count, combined with TCP / IP handshake and packet loss retransmission mechanisms, can ensure reliability during transmission. An existing application of this method already utilizes the aforementioned WebSocket library approach.

[0063] After uploading the dynamically generated code from the graphical programming software to the embedded device and updating the existing program code via the aforementioned wireless communication link, a debug command is sent to perform a software or hardware reset of the embedded device's board in order to load the new program and run it. A software reset can be achieved by calling a reset function supported by the embedded device's main controller, while a hardware reset can be performed by controlling the relevant hardware reset circuitry of the embedded device.

[0064] In this embodiment, for the microcontroller, some complex devices and interface drivers (such as TFT color screens using RGB and SPI interfaces, IO expanders using I2C interfaces, etc.) have undergone hardware abstraction layer (HAL) reconstruction to optimize control logic, timing and interrupt response.

[0065] To minimize impact on code efficiency, this embodiment employs reentrant functions and modular programming to encapsulate low-level hardware control code through multi-level encapsulation. This includes, but is not limited to, encapsulating peripheral bus communication and register read / write operations into a unified access and control interface. This addresses the developer-unfriendly issues arising from complex hardware bus protocols and numerous low-level hardware operations, which can lead to knowledge gaps. Furthermore, this embodiment exposes easily usable, reusable, and modular API interfaces at the top layer of encapsulation, significantly reducing the graphical blocks required for peripheral control, simplifying peripheral control logic, improving the efficiency of graphical embedded development, and lowering the barrier to entry for novice and cross-disciplinary developers.

[0066] By comparing the traditional C / C++ code for driving TFT LCD screens using the software development environment (SDK) provided by the ESP32 official website, the existing technology requires more than 80 lines of code just to call some pre-packaged functions to complete the screen initialization. In this embodiment, the graphical programming plugin implementation only uses a few lines of code to complete the initialization of the screen and touch screen, and can also realize some functions, such as clearing the screen and creating and displaying line charts.

[0067] This embodiment supports multiple microcontrollers in the ESP32 series and adds drivers for dozens of sensors and peripherals, covering core functions required for the Internet of Things such as environmental detection, human-computer interaction, motion control, audio control, and communication. Figures 3 to 12The diagram shows a partial application example of the graphical programming method for embedded devices according to one embodiment of this application. In this embodiment, the graphical programming method involves downloading and installing the graphical programming software and its related plugins to a browser, selecting the board of the embedded device to be developed, and entering the development page. Customized MicroPython firmware can be wirelessly burned into the board. Hardware connection methods are provided on the graphical blocks or in the user manual (some onboard sensors and devices do not require connection, so these blocks do not have hardware connection instructions). The required sensor or peripheral graphics blocks are dragged and dropped onto the canvas. Control flows are designed by dragging and dropping graphics blocks from the graphic block library, such as "When the gesture sensor detects an upward wave -> control the motor to accelerate". Finally, the board is put into upload mode, the device running the graphical development environment is connected to the WiFi hotspot generated by the board, and then upload is clicked. After the program is uploaded, the device is debugged based on the program logic and observed phenomena.

[0068] This embodiment also provides an electronic terminal. Figure 13 This is a schematic block diagram of the electronic terminal provided in an embodiment of this application. Figure 13 As shown, the electronic terminal includes at least one processor 401, a memory 402, at least one network interface 403, and a user interface 405. The various components in the electronic terminal are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 13 The general will label all buses as bus systems.

[0069] The user interface 405 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.

[0070] It is understood that memory 402 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.

[0071] In this embodiment of the invention, the memory 402 is used to store various types of data to support the operation of the electronic terminal 400. Examples of this data include: any executable program for operation on the electronic terminal 400, such as the operating system 4021 and application programs 4022; the operating system 4021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 4022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The embedded device graphical programming method provided in this embodiment of the invention can be included in the application program 4022.

[0072] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 401 may be a microprocessor or any conventional processor, etc. The steps of the embedded device graphical programming method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.

[0073] In an exemplary embodiment, the electronic terminal 400 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.

[0074] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figures 1 to 5 The method of any of the embodiments shown.

[0075] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when run on a computer, causes the computer to perform any of the methods described in the above embodiments.

[0076] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0077] Those skilled in the art will recognize that the various illustrative logical blocks and steps (S1) described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0078] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, electronic terminals, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed systems, electronic terminals, and methods can be implemented in other ways. For example, the electronic terminal embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; the indirect couplings or communication connections between electronic terminals or units may be electrical, mechanical, or other forms.

[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0082] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable electronic terminal. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state drives, SSDs, etc.).

[0083] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0084] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0085] In summary, this application significantly reduces the number of graphical blocks required to control embedded devices, simplifies the control logic method, improves the efficiency of graphical embedded development, lowers the barrier to entry for novice and cross-disciplinary developers, and effectively solves the technical problems of low hardware development efficiency, poor compatibility, and limitations of development environment platforms in existing embedded systems. Therefore, this application effectively overcomes the various shortcomings of existing technologies and has high industrial application value.

[0086] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A graphical programming method for embedded devices, characterized in that: The method includes: The development environment for embedded hardware graphical programming is embedded into the browser as a plug-in, and the graphical programming interface for embedded devices is displayed on the page. A wireless communication link is established between the embedded hardware graphical programming development environment and the embedded device to be developed via wireless communication. The topological relationship between graphical blocks and functional codes of various functional modules of the embedded device is pre-configured. Hardware control logic is formed by dragging and splicing the graphical blocks in the graphical programming interface of the embedded device. Based on the topological relationship between each graphical block and the corresponding functional code, control code that implements the hardware control logic is generated in the graphical programming interface of the embedded device. The control code is uploaded to the embedded device to be developed via the wireless communication link, and debugging instructions are sent to control the embedded device to be developed for debugging.

2. The embedded device graphical programming method according to claim 1, characterized in that: The functional modules include various sensors, a display control module, a peripheral driver module, an artificial intelligence application module, and a communication module.

3. The embedded device graphical programming method according to claim 2, characterized in that: The sensors include any or more of the following: color sensor, carbon dioxide sensor, non-contact temperature sensor, piezoelectric weighing sensor, water quality detection sensor, and gesture recognition sensor; the display control module includes any or more of the following: TFT display screen, industrial serial port screen, digital tube screen, and LVGL human-machine interface based on MicroPython; the peripheral drive module includes any or more of the following: multi-channel audio acquisition module, audio codec module, multi-channel motor drive module, and IO expander; the artificial intelligence application module includes any or more of the following: offline speech recognition module, offline speech synthesis module, AI vision module, and image recognition module; the communication module includes a Bluetooth mode module and / or a radio frequency identification module.

4. The embedded device graphical programming method according to claim 1, characterized in that: The embedded device to be developed has a built-in update program module for receiving the control code dynamically generated by the development environment of the embedded hardware graphical programming and updating the control code into the embedded device to be developed.

5. The embedded device graphical programming method according to claim 1, characterized in that: In response to receiving an upload command, the control code is uploaded to the embedded device to be developed via the wireless communication link by calling a JavaScript library related to controlling the wireless communication link.

6. The embedded device graphical programming method according to claim 1 or 5, characterized in that: When establishing the wireless communication link, the process also includes sending the ID of the embedded device to be developed to the development environment for the embedded hardware graphical programming.

7. The embedded device graphical programming method according to claim 1 or 5, characterized in that: Before uploading the control code to the embedded device to be developed via the wireless communication link, the control code is further encapsulated at multiple levels.

8. An electronic terminal, characterized in that, include: Includes memory used to store computer programs; A processor for running the computer program to implement the steps of the embedded device graphical programming method as described in any one of claims 1 to 7.

9. A computer storage medium storing program instructions, characterized in that: When the program instructions are executed, they implement the steps of the embedded device graphical programming method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes computer program code, which, when run on a computer, causes the computer to implement the steps of the embedded device graphical programming method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Graphical mode programming platform generation method and device and computer device

    CN108958725A

  • Programming support device

    CN115202650A

  • Content presentation method and device, equipment and storage medium

    CN117131296A

  • Graphical programming system and graphical programming method for science education

    CN119781755A

  • Online graphical programming system based on blockly and raspberry pi and method for using same

    WO2020248811A1