Control method and programming platform for programming teaching equipment used in scientific and technological innovation education

By setting timestamps for two buttons on the programming teaching equipment and judging their status, the problem of inaccurate detection of two buttons simultaneously in the prior art is solved, and the fault tolerance of user operations and the accuracy of detection are improved.

CN119781319APending Publication Date: 2025-04-08SHENZHEN DIANMAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411763853.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the detection is inaccurate when two buttons on the programming teaching equipment are pressed simultaneously, resulting in excessive user operation accuracy requirements and it is difficult to achieve accurate synchronization.

Method used

By obtaining the status of the two buttons of the programming teaching equipment and setting a timestamp for each button, based on these timestamps and button status, it is determined whether the two buttons are clicked at the same time.

Benefits of technology

It improves the fault tolerance of user operations and reduces the precise synchronization requirement for button release time, making the simultaneous click detection of dual buttons more accurate and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781319A_ABST
    Figure CN119781319A_ABST
Patent Text Reader

Abstract

The present invention discloses a control method and a programming platform for a programming teaching device for science and technology education. The method includes cyclically executing the following: obtaining the state of a first button and the state of a second button of a programming teaching device, and setting a first timestamp for the first button and a second timestamp for the second button; determining whether the first button and the second button are clicked at the same time based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button. The present invention solves the technical problem of inaccurate detection when two buttons on a programming teaching device are pressed at the same time in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a control method and a programming platform for programming teaching equipment used for scientific and technological innovation education. Background Art

[0002] In hardware programming teaching, the widely used micro motherboard is equipped with two physical buttons. Users can detect the state of the buttons, that is, "pressed" or "released" through Python programming. In general, the "click" operation can be defined as the process of a button being "pressed" and then "released". In teaching and application, it is sometimes necessary to determine whether two buttons are "clicked" at the same time, such as to start a function or trigger an event. In the prior art, the synchronous detection of two buttons usually relies on continuously obtaining the real-time status of the two buttons. When it is detected that the two buttons change from the previous state of "pressed" to the current state of "released" at the same time, the system identifies it as "simultaneous click".

[0003] However, this method has significant limitations. Due to the limitation of manual operation, it is almost impossible to achieve precise synchronization of the two buttons being "released" at exactly the same moment. The existing detection method strictly requires that the two buttons be released at the same time, which places extremely high demands on the user's operation accuracy, and it is difficult for the human hand to achieve such precise control. This operational inconvenience makes the existing synchronization detection method more difficult in practical applications, affecting the user experience of hardware programming teaching and the stability of function implementation.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a control method and a programming platform for a programming teaching device for scientific and technological innovation education, so as to at least solve the technical problem of inaccurate detection when two buttons on a programming teaching device are pressed simultaneously in the prior art.

[0006] According to one aspect of an embodiment of the present invention, a control method for a programming teaching device for scientific and technological education is provided, including: obtaining the state of a first button and the state of a second button of the programming teaching device, and setting a first timestamp for the first button and a second timestamp for the second button; based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button, determining whether the first button and the second button are clicked at the same time.

[0007] According to another aspect of an embodiment of the present invention, a control device for a programming teaching device for scientific and technological education is also provided, including: an acquisition module, configured to acquire the state of a first button and the state of a second button of the programming teaching device, and set a first timestamp for the first button and a second timestamp for the second button; a judgment module, configured to determine whether the first button and the second button are clicked simultaneously based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button.

[0008] In an embodiment of the present invention, the state of a first button and the state of a second button of a programming teaching device are obtained, and a first timestamp is set for the first button and a second timestamp is set for the second button; based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button, it is determined whether the first button and the second button are clicked at the same time. The above solution solves the technical problem of inaccurate detection when two buttons on a programming teaching device are pressed at the same time in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0010] Figure 1 is a flow chart of a control method of a programming teaching device for scientific and technological innovation education according to an embodiment of the present application;

[0011] Figure 2 It is a structural schematic diagram of a control device of a programming teaching device for scientific and technological innovation education according to an embodiment of the present application;

[0012] Figure 3 is a flow chart of another control method of a programming teaching device for scientific and technological innovation education according to an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of another control device of a programming teaching device for scientific and technological innovation education according to an embodiment of the present application;

[0014] Figure 5 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0016] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0017] According to an embodiment of the present invention, a method embodiment of a control method for a programming teaching device for scientific and technological education is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0018] Figure 1 is a control method for a programming teaching device for science and technology education according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0019] Step S102, obtaining the state of a first button and the state of a second button of the programming teaching device, and setting a first timestamp for the first button and a second timestamp for the second button.

[0020] Step S104: determining whether the first button and the second button are clicked simultaneously based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button.

[0021] When the first timestamp is greater than the current time, determine whether the first button and the second button are clicked simultaneously based on the state of the second button; when the first timestamp is not greater than the current time and the second timestamp is greater than the current time, determine whether the first button and the second button are clicked simultaneously based on the state of the first button; when the first timestamp is not greater than the current time and the second timestamp is not greater than the current time, determine whether the first button and the second button are clicked simultaneously based on the state of the first button and the state of the second button.

[0022] When the first timestamp is greater than the current time, determine whether the second button is in a released state; when it is determined that the second button is in a released state, determine that the first button and the second button are clicked simultaneously, and set the first timestamp and the second timestamp to zero; when it is determined that the second button is not in a released state, determine that the first button and the second button are not clicked simultaneously.

[0023] When the first timestamp is not greater than the current time and the second timestamp is greater than the current time, the first timestamp is set to zero and it is determined whether the first button is in a released state; when it is determined that the first button is in a released state, it is determined that the first button and the second button are clicked at the same time, and the first timestamp and the second timestamp are set to zero; when it is determined that the first button is not in a released state, it is determined that the first button and the second button are not clicked at the same time.

[0024] If the first timestamp is not greater than the current time and the second timestamp is not greater than the current time, the first timestamp and the second timestamp are set to zero; determine whether the first button and the second button are both in the clicked state. If the first button and the second button are both in the clicked state, determine that the first button and the second button are clicked at the same time; otherwise, determine that the first button and the second button are not clicked at the same time, and set the timestamp corresponding to the button in the clicked state of the first button and the second button to the current time plus the preset time threshold.

[0025] This application improves the user experience by defining more flexible time windows.

[0026] The embodiment of the present application provides another control method for a programming teaching device for scientific and technological innovation education, which is applied on a graphical programming platform and can detect the operation of a user "clicking" two buttons at the same time in a short period of time. Figure 2 As shown, the graphical programming platform includes a state recording module 22 and a judgment module 24 .

[0027] The state recording module 22 is used to record the click state of button A (i.e., the first button) and button B (i.e., the second button) in real time, including two states: "pressed" and "released". Initially, the states of button A and button B are both set to "released", and the initial values ​​of timestamp A and timestamp B are set to 0, which is used to determine the time window of "simultaneous click". The state recording includes initializing the button state, that is, setting the initial value of the last state of button A and button B to "released". Every time the system detects a change in the button state, it records the current state of the button. If it is detected that the current state of the button changes from "pressed" to "released", it is determined that the button is in the "clicked" state. At the moment the button is clicked, a deadline is generated. If button A is clicked and button B has not been released, timestamp A (i.e., the first timestamp) is recorded, and the value is "current time + 60 milliseconds"; similarly, if button B is clicked and button A has not been released, timestamp B (i.e., the second timestamp) is recorded.

[0028] The judgment module 24 judges whether the two buttons are "clicked at the same time" according to the data provided by the state recording module and the following rules. First, judge whether the timestamp A is greater than the current time and whether the button B is released, or whether the timestamp B is greater than the current time and whether the button A is released. If one of the conditions is met, it is determined that the two buttons are "clicked at the same time", and the new click operation is recorded and continued to be monitored. Otherwise, if it is detected that button A and button B are in the click state at the same time, it is immediately determined as "clicked at the same time". If both of the above two conditions are not met, and only one button is clicked and the other button is in the released state, the timestamp corresponding to the clicked button is updated to "current time + 60 milliseconds", and return to the first step for re-judgment.

[0029] In this control method, the system defines "simultaneous click" as both buttons (button A and button B) are clicked within a 60 millisecond time window. Of course, in other embodiments, the time threshold can also be other time values ​​other than 60 milliseconds. This application captures the state changes of the buttons and uses timestamps to determine whether the two buttons meet the definition of "simultaneous click", thereby avoiding the dormant operation of the blocking thread and ensuring that other coroutines can still operate normally when the system processes the "simultaneous click" detection.

[0030] The following will describe the operation process of the graphical programming platform in detail. Figure 3 As shown, the control method of the programming teaching device for science and technology education applied on the graphical programming platform includes cyclically executing the following steps:

[0031] Step S301, detect and record the status of button A and button B.

[0032] The status of the two buttons is detected in real time through the hardware programming interface of the micro. Specifically, the system obtains whether button A and button B are currently in the "pressed" or "released" or "clicked" state. Among them, the definition of the click state is: if the last state of the button is "pressed" and the current state is "released", the button is considered to be in the "clicked" state.

[0033] The system records the last state and current state of button A and button B respectively. The initial state is set to "release". In order to track the click time of the two buttons, the system sets a timestamp variable (i.e. "timestamp A" and "timestamp B") for button A and button B respectively to record the "click" time window. The initial value of the timestamp is 0.

[0034] Step S302, determine whether timestamp A is greater than the current time.

[0035] The system checks whether timestamp A is greater than the current time to determine whether the click of button A occurs within the specified time window. If timestamp A is greater than the current time, the process proceeds to step S303; otherwise, the process jumps to step S304.

[0036] Step S303, determining whether button B is released.

[0037] The system detects whether the state of button B is "released". If button B is released, the system sets timestamp A and timestamp B to zero and jumps to step S311 to execute the callback function of clicking two buttons at the same time. If button B is not released, the system jumps to step S301 to continue the loop detection.

[0038] Step S304, setting timestamp A to zero.

[0039] If timestamp A is less than or equal to the current time, it means that the click of button A has exceeded the specified time window, so timestamp A is set to zero and cleared to ensure the accuracy of subsequent judgments.

[0040] Step S305, determining whether timestamp B is greater than the current time.

[0041] The system checks whether timestamp B is greater than the current time to determine whether the click of button B occurs within the specified time window. If timestamp B is greater than the current time, the process proceeds to step S306; otherwise, the process jumps to step S307.

[0042] Step S306, determining whether button A is released.

[0043] The system detects whether the state of button A is "released". If button A is released, the system sets timestamp A and timestamp B to zero and jumps to step S311 to execute the callback function of clicking two buttons at the same time. If button A is not released, the system jumps to step S301 to continue the loop detection.

[0044] Step S307, setting timestamp B to zero.

[0045] If timestamp B is less than or equal to the current time, it means that the click of button B has exceeded the specified time window, so timestamp B is set to zero and cleared to ensure the accuracy of subsequent judgments.

[0046] Step S308, determining whether button A and button B are both in the "click" state.

[0047] The system detects whether button A and button B are in the "click" state at the same time. If both buttons are in the "click" state, the system proceeds to step S311 to execute the callback function of clicking both buttons at the same time. If both buttons are not in the "click" state at the same time, the system jumps to step S309 to continue the judgment.

[0048] Step S309, determine whether button A is "clicked" and whether button B is "pressed".

[0049] The system detects whether button A is in the "clicked" state and button B is in the "pressed" state. If button A is in the "clicked" state and button B is in the "pressed" state, then the process proceeds to step S312 to set timestamp A; otherwise, the process proceeds to step S310.

[0050] Step S310, determining whether button B is “clicked” and button A is “pressed”.

[0051] The system detects whether button B is in the "clicked" state and button A is in the "pressed" state. If button B is in the "clicked" state and button A is in the "pressed" state, then go to step S313 to set timestamp B; otherwise, jump to step S301 to continue the loop detection.

[0052] Step S311, executing the callback function of clicking two buttons simultaneously.

[0053] When the system determines that the two buttons are "clicked simultaneously" within the specified time, the user-defined callback function is executed to implement the corresponding control logic. After executing the callback function, the system jumps to step S301 and restarts the cycle to detect the button status.

[0054] Step S312, setting timestamp A to current time + 60 milliseconds.

[0055] The system sets timestamp A to the current time plus 60 milliseconds, which means that within the next 60 milliseconds, if button B is clicked, the two buttons can be considered "clicked at the same time." After setting the timestamp, the system jumps to step S301 to continue the loop detection.

[0056] Step S313, setting timestamp B to the current time + 60 milliseconds.

[0057] The system sets timestamp B to the current time plus 60 milliseconds, which means that within the next 60 milliseconds, if button A is clicked, the two buttons can be considered "clicked at the same time." After setting the timestamp, the system jumps to step S301 to continue the loop detection.

[0058] By detecting the click status of two buttons within a preset time, the present application can loosely judge whether the two buttons are "clicked at the same time", thereby avoiding the strict requirement of the prior art for precise synchronization and greatly improving the fault tolerance of user operations. In addition, the present method realizes simple and effective hardware control through the dynamic setting and judgment of timestamps.

[0059] The present application also provides a control device for a programming teaching device for scientific and technological innovation education, such as Figure 4 As shown, it includes: an acquisition module 42, which is configured to acquire the state of a first button and the state of a second button of a programming teaching device, and set a first timestamp for the first button and a second timestamp for the second button; a judgment module 44, which is configured to determine whether the first button and the second button are clicked at the same time based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button.

[0060] It should be noted that the control device for the programming teaching equipment for scientific and technological education provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the control device for the programming teaching equipment for scientific and technological education provided in the above embodiment and the control method embodiment of the programming teaching equipment for scientific and technological education belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0061] The embodiment of the present application also provides a graphical programming system, which is intended to be applied to science and technology education and basic programming learning in programming teaching, and is particularly suitable for programming beginners, teenagers, and programming beginners. The system includes a graphical programming platform and a programming teaching device, wherein the programming teaching device can be a micro. By combining a graphical programming interface and hardware devices, users can master basic programming knowledge and logical thinking skills in an intuitive operating environment.

[0062] The core of the graphical programming system is an integrated development environment, which includes a graphical programming platform and programming teaching equipment (such as micro hardware). The graphical programming platform adopts a modular drag-and-drop interface design, allowing users to build logical processes without writing complex codes, which is suitable for beginners to get started quickly. The programming teaching equipment micro is a micro-computing device suitable for education, which integrates a variety of sensors and input and output interfaces (such as buttons, LED displays, etc.), and supports a variety of programming languages ​​​​such as JavaScript and Python.

[0063] In this system, the graphical programming platform serves as a bridge between the user and the hardware device, allowing the user to program and control the micro through a graphical interface. The interaction process mainly includes the following steps: First, the user writes the program on the graphical programming interface by dragging and combining code blocks. Each code block corresponds to a specific operation, such as button detection, LED display, sensor data reading, etc. The user can combine these functions into a complete program logic through simple operations. Secondly, after the user completes the programming, the system compiles the code into instructions that the micro can understand and transmits it to the micro device via USB or wirelessly. The programming platform also detects the logical integrity of the code during the upload process to ensure that the instructions can run normally on the micro. For example, the first eigenvector of the context code of the graphical programming job and the second eigenvector of the current code to be detected are extracted respectively. According to the extended rank criterion, the first eigenvector and the second eigenvector are respectively upgraded, and the first eigenvector and the second eigenvector are coupled and fused using a multi-channel convolution kernel to obtain the coupled main embedding feature matrix and auxiliary embedding feature matrix. The above matrix is ​​expanded along the direction of the extended dimension to form multiple sub-matrices. Each sub-matrix is ​​subjected to singular value decomposition to extract the core subspace representation and factor matrix. The principal component differences between the main feature matrix and the auxiliary feature matrix are calculated based on the core subspace representation and the factor matrix to extract the core features, thereby effectively identifying logical errors and reference problems.

[0064] After receiving the instruction, micro will perform the corresponding operation according to the logic set by the user on the graphical programming platform. For example, if the program involves button detection, micro will continuously monitor the status of button A and button B, and execute the control method of the programming teaching device for science and technology education in the above embodiment. When the user presses or clicks the button, micro can provide real-time feedback to the graphical programming platform to help the user understand the relationship between programming logic and hardware response. During the debugging process, if the user finds a problem, he can modify the code on the graphical programming platform and re-upload it to micro to quickly locate and solve the problem, thereby improving learning efficiency.

[0065] In the specific interactive implementation of button detection, the graphical programming platform designs the button detection function as a draggable code block, through which users can define the detected button (such as button A or button B) and its triggering conditions. For example, users can set the "pressed", "released", "clicked" and other states of the button, and judge the operation of the button in combination with the timestamp to achieve "simultaneous click" detection of two buttons. When it is detected that button A and button B are "clicked at the same time" within the specified 60 milliseconds, the system will trigger the callback function set by the user, and the corresponding feedback information will be displayed on the LED display on the micro or the graphical programming platform. This feedback mechanism helps users intuitively understand the performance of programming logic on hardware and enhances the learning experience.

[0066] This graphical programming system lowers the threshold for programming learning by visualizing complex programming logic and simplifying code block operations, making it suitable for programming beginners and teenagers. In addition, the system's real-time feedback mechanism helps users understand hardware responses and improves operational flexibility and fault tolerance. The system supports multiple programming languages ​​such as JavaScript and Python to meet the needs of different learning stages, and based on a modular design, it supports the expansion of more new functional modules (such as sensors and display modules), providing users with a wider range of application scenarios.

[0067] For example, in the science and innovation class, the teacher wants students to use micro to learn to control LED lights and achieve a flashing effect through a double-button combination operation. In the graphical programming platform, the teacher can set the detection logic of button A and button B, and design a callback function for the "simultaneous click" of the two buttons to trigger the LED light to light up. Students design code blocks through the platform, upload them to the micro and test the double-button detection function, observe the changes in the LED light through the feedback of the micro, and further understand the relationship between button detection and hardware feedback, so as to master the basic knowledge of programming.

[0068] The graphical programming system provided in the embodiment of the present application provides an intuitive operating environment and interactive experience by combining a graphical programming platform with programming teaching equipment such as micro. The system is simple to operate and has intuitive feedback, which can effectively enhance the user's programming interest and hands-on ability. It is an ideal tool for scientific and technological education and basic programming learning.

[0069] Figure 5 FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0070] like Figure 5As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0071] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0072] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A control method for a programming teaching device for scientific and technological innovation education, characterized in that: Include a loop that executes the following: Acquire the state of a first button and a second button of a programming teaching device, and set a first timestamp for the first button and a second timestamp for the second button; Based on at least one of the first timestamp and the second timestamp, a state of the first button, and a state of the second button, it is determined whether the first button and the second button are clicked simultaneously.

2. The method according to claim 1, characterized in that Determining whether the first button and the second button are clicked simultaneously based on at least one of the first timestamp and the second timestamp, a state of the first button, and a state of the second button includes: In a case where the first timestamp is greater than the current time, determining whether the first button and the second button are clicked simultaneously based on the state of the second button; When the first timestamp is not greater than the current time and the second timestamp is greater than the current time, determining whether the first button and the second button are clicked simultaneously based on the state of the first button; When the first timestamp is not greater than the current time and the second timestamp is not greater than the current time, it is determined whether the first button and the second button are clicked simultaneously based on the state of the first button and the state of the second button.

3. The method according to claim 2, characterized in that In a case where the first timestamp is greater than the current time, determining whether the first button and the second button are clicked simultaneously based on the state of the second button includes: When the first timestamp is greater than the current time, determining whether the second button is in a released state; When it is determined that the second button is in a released state, determining that the first button and the second button are clicked simultaneously, and setting the first timestamp and the second timestamp to zero; When it is determined that the second button is in an unreleased state, it is determined that the first button and the second button are not clicked simultaneously.

4. The method according to claim 2, characterized in that: When the first timestamp is not greater than the current time and the second timestamp is greater than the current time, determining whether the first button and the second button are clicked simultaneously based on the state of the first button includes: When the first timestamp is not greater than the current time and the second timestamp is greater than the current time, the first timestamp is set to zero, and it is determined whether the first button is in a released state; When it is determined that the first button is in a released state, determining that the first button and the second button are clicked simultaneously, and setting the first timestamp and the second timestamp to zero; When it is determined that the first button is in an unreleased state, it is determined that the first button and the second button are not clicked at the same time.

5. The method according to claim 2, characterized in that: When the first timestamp is not greater than the current time and the second timestamp is not greater than the current time, determining whether the first button and the second button are clicked simultaneously based on a state of the first button and a state of the second button includes: If the first timestamp is not greater than the current time and the second timestamp is not greater than the current time, setting the first timestamp and the second timestamp to zero; Based on the state of the first button and the state of the second button, it is determined whether the first button and the second button are clicked simultaneously.

6. The method according to claim 5, characterized in that Determining whether the first button and the second button are clicked simultaneously based on the state of the first button and the state of the second button includes: Determine whether the first button and the second button are both in a clicked state; When both the first button and the second button are in a clicked state, it is determined that the first button and the second button are clicked at the same time; otherwise, it is determined that the first button and the second button are not clicked at the same time, and the timestamp corresponding to the button in the clicked state among the first button and the second button is set to the current time plus a preset time threshold.

7. A control device for programming teaching equipment for scientific and technological innovation education, characterized in that: Include a loop that executes the following: An acquisition module is configured to acquire the state of a first button and a state of a second button of the programming teaching device, and set a first timestamp for the first button and a second timestamp for the second button; The judgment module is configured to determine whether the first button and the second button are clicked simultaneously based on at least one of the first timestamp and the second timestamp, the state of the first button, and the state of the second button.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.