Programming language materialized building block programming system
Technical Field
The utility model relates to a programming system, concretely relates to programming language materialization building blocks programming system.
Background
Nowadays, with the rapid development and more practical application of artificial intelligence technology, software algorithms as the important basis of artificial intelligence have attracted extensive attention to the importance of programming education, and particularly, programming education is gradually listed in the primary and middle school education synopsis of all countries in the world.
However, the traditional programming education method has a high threshold, has certain requirements on the age and the logic abstraction capability of students, and needs to be performed by depending on a computer programming language environment or a hardware method such as a tablet computer. The conventional programming environment requires text input through a keyboard, is inconvenient for children to understand and use, and requires understanding and memorizing of grammars and complex instructions in a programming language. It is often difficult for them to remember and understand the expertise of program syntax, logical relationships, and program structure. In addition, for children with unfamiliar mastered characters, the text grammar programming mode is lack of intuition, and the children cannot create own programs by adopting the traditional programming mode. For the younger children and the students in the lower grades, the traditional education mode has objective difficulty, and the screen type programming environment is used, so that the interaction operation is needed through hardware peripherals, the difficulty of learning is increased for the students in the learning process, the attention of the students is easily dispersed, and the effect of programming education cannot be expected.
In the prior art, there are also some related researches, for example, chinese patent application with publication number CN108806405A discloses "a materialized children programming building block and its using method", including a circulation type main building block, a selection type main building block, a branch type main building block and a plurality of digital building blocks; the circulation type main building block, the selection type main building block and the branch type main building block respectively comprise a first microprocessor, an output module, a power interface module and a data communication interface module which are electrically connected; the digital building block comprises a second microprocessor, and the circulating type main building block, the selecting type main building block and the branch type main building block are spliced with the digital building block through a power interface module and a data communication interface module respectively. The utility model discloses an embedded microprocessor in traditional building blocks to through the concatenation of a plurality of building blocks, realize the circulation in traditional programming language, select and the branch structure, can be used to children's early programming language's study. However, the materialized child programming building block does not have free expression of mathematical elements and logic elements which a programming language should have, for example, functions and parameters are not completely and independently separated and cannot be freely expressed; meanwhile, the materialized children programming building block and the using method thereof do not conform to the general concept of a programming environment, do not have the function of debugging and interrupting programming codes, and are not beneficial to the visual learning training of programming logic thinking.
Chinese patent application publication No. CN 102136208A discloses "a physical programming method and system", which includes a plurality of physical programming blocks, an image acquisition unit, a physical programming processing unit, and an output device of a physical programming display environment; the object programming block is positioned in the shooting range of the image acquisition unit, and the object programming processing unit is respectively connected with the output equipment of the object programming display environment and the image acquisition unit; the object programming processing unit stores a syntax semantic judgment rule of the object programming display environment, and the surface of each object programming block is provided with a computer visual identification code and a semantic graph; the object programming processing unit is used for judging whether a functional semantic sequence corresponding to the object programming block sequence currently acquired by the image acquisition unit meets a syntax semantic judgment rule of the object programming display environment or not and feeding back prompt information according to a judgment result. However, the system needs to be implemented by a computer, and needs to be implemented by a camera and a computer vision technology to program through a physical programming block, which is very limited.
SUMMERY OF THE UTILITY MODEL
Not enough to prior art, the utility model provides a programming language materialization long-pending wood programming system, with programming language and programming environment materialization, the building blocks that the application possesses programming function accomplish programming teaching and engineering application. The programming language materialization building block programming system can be completely separated from a computer or a tablet personal computer, does not depend on a software programming environment running on the computer, can be combined with building block toys familiar to children, is interesting, and can be educated in lively activities, so that the programming education of children for learning and playing in the middle of playing is realized.
In order to realize the technical scheme, the utility model provides a programming language materialization building blocks programming system, include: the system comprises a starting module, a functional module, a parameter module, a main control module and an interface unit, wherein a control panel is arranged in each module, the control panel is integrated with a microcontroller, the adjacent modules are allowed to acquire or provide power supply, communication and module distinguishing functions, and data and the interface unit are read from the parameter module and are controlled by the control panel, wherein the parameter module is completely independent of the functional module, and different parameter modules can be configured in the functional module; the programming end is composed of the starting module, the functional module and the parameter module to realize the object programming, and the execution end is composed of the main control module, the interface unit and the universal building blocks thereof to realize the execution after the program compiling.
Preferably, the starting module is a programming end main controller, supplies power through a built-in power supply or an external power supply, and supplies power to various functional modules of the programming end through interfaces on four sides of the module.
Preferably, the main control module is an execution end main controller, supplies power through a built-in power supply, supplies power and communicates with the interface unit through interfaces on two sides of the module, and the interfaces on two sides of the module are configured according to the requirement to match with the specific interface unit. The communication between the starting module and the main control module is carried out in a wireless mode.
Preferably, the functional module and the parameter module are separated between different physical axes, the functional module is placed on a horizontal two-dimensional plane, the parameter module is placed on a vertical plane, and the parameter module is superposed on the functional module.
Preferably, the parameter modules corresponding to each type of function module are different, and each type of function module is printed with a pattern related to the physical meaning thereof, the appearance of the corresponding parameter module is consistent with the outline design of the pattern, the same pattern is printed, and the meaning mark represented by the parameter module is printed.
Preferably, during the running of the program, the main control module and the starting module, and the starting module and the function module are in bidirectional communication.
The utility model provides a pair of building blocks programming system is materialized to programming language's beneficial effect lies in:
1) the programming language and the programming environment are materialized, and the building blocks with the programming function are applied to finish programming teaching and engineering application. The programming language materialized building block programming system can be completely separated from a computer or a tablet personal computer, does not depend on a software programming environment running on the computer, can be combined with building block toys familiar to children, is interesting, and can teach through lively activities.
2) A physical programming interface with a multi-threaded command sequence distinguishes functions and parameters by separating them into different planes (horizontal and vertical) and associates the parameter quantization size and its function with its physical appearance and size. The association between functionality and physical appearance also makes possible an automatic error prevention system through a one-to-one relationship, i.e. each parameter has a unique recipient in the functional module. The system also enables debugging by notifying functional errors using indicator lights.
3) Through the cooperation between start module, functional module, parameter module, host system and the interface unit in this programming language materialization building blocks programming system, can realize: real-time debugging, circulation, random assignment, conditional instruction, multithreading, syntax error prevention, logic error prevention, competition condition and other basic 'programming element' learning.
4) The programming language materialization building block programming system realizes the function materialization, namely: different functional modules contain different function functions, and are materialized into different functional building blocks (conditions, movement, circulation, specific functions and the like); the function parameter materialization is also realized, namely: integrating the function into the parameter and changing the parameter; multi-thread programming can be realized, and the simultaneous operation of different threads can be realized; meanwhile, the debugging system can be compiled, visual gradual compiling and debugging are realized, and the LED lamp indicates a debugging break point.
Drawings
Fig. 1 is a schematic diagram of a block programming connection structure in embodiment 1.
Fig. 2 is a schematic perspective view of a starting module in embodiment 1.
Fig. 3 is a schematic perspective view of a functional module i in embodiment 1.
Fig. 4 is a schematic perspective view of a functional module ii in embodiment 1.
Fig. 5 is a schematic perspective view of a functional module iii in embodiment 1.
Fig. 6 is a schematic perspective view of a parameter module in embodiment 1.
Fig. 7 is a schematic perspective view of a main control module in embodiment 1.
Fig. 8 is a schematic perspective view of an interface unit in embodiment 1.
Fig. 9 is a schematic structural view of the case where the execution end is a dolly in embodiment 2.
In the figure: 1. a starting module; 11. a start button; 12. a stop button; 13. an LED indicator light; 14. a battery power indicator light; 2. a functional module; 21. a pattern; 3. a parameter module; 4. a main control module; 41. a power switch button; 5. an interface unit; 6. universal building blocks; 7. and (7) wheels.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by a person skilled in the art without any inventive step are within the scope of the present invention.
Example 1: a programming language materialization building block programming system.
Referring to fig. 1 to 8, a programming language materialized building block programming system includes: the system comprises a starting module 1, a functional module 2, a parameter module 3, a main control module 4 and an interface unit 5, wherein the starting module 1, the functional module 2, the parameter module 3, the main control module 4 and the interface unit 5 are all represented in the form of building blocks, the parameter module 3 is completely independent of the functional module 2, and the two are arranged separately, namely each functional module 2 can be matched with different parameter modules 3; the starting module 1 is provided with a starting button 11, a stopping button 12, an LED indicator light 13 and a battery power indicator light 14; the functional module 2 is arranged in various shapes; the main control module 4 is provided with a power switch button 41; the interface unit 5 mainly includes an input module (e.g., a sound sensor, a distance sensor, a light sensor, a touch sensor, etc.), an output module (e.g., a buzzer, an LED lamp, etc.), a motor, and the like. Each module has built in it a control board integrating a microcontroller allowing the modules adjacent to it to acquire or provide power supply, communication, differentiating module functions and reading data from the parameter modules 3 and controlling the interface unit 5.
The system comprises a starting module 1, a functional module 2 and a parameter module 3, wherein the starting module 1, the functional module 2 and the parameter module 3 form a programming end to realize real object programming; and the programming end is mainly responsible for realizing a programming system, such as programming syntax check, compiling and debugging and the like. After the object programming is completed, the Play key of the starting module at the programming end is pressed, the starting module 1 can communicate with and read the assignment of the related function module 2 and the parameter module 3 thereof (the green LED indicator lamp 13 of the currently read function module 2 is synchronously turned on), and the debugging and compiling are performed, if the debugging is interrupted due to a syntax error, the red LED indicator lamp 13 of the corresponding function module 2 is turned on, so as to assist in checking and correcting the programming error. When debugging and compiling are correct, the starting module 1 uploads the compiled codes to the main control module 4 of the execution end.
An execution end is formed by the main control module 4, the interface unit 5 and the universal building blocks 6 thereof, and the execution after the program compiling is realized; and the execution end is mainly responsible for executing after programming, and realizes the control interaction of the corresponding input and output unit through the main control module 4. And after the main control module 4 receives the codes uploaded by the programming end, independently executing related instructions according to the codes. In the execution process, except for the execution stopping instruction (Stop key) of the starting module 1, the execution end is not influenced by the programming end, and the execution is not influenced even if the programming end is detached.
In the process of executing the code at the execution end, the main control module 4 synchronizes the state of the executed step to the starting module 1 at the programming end, and the starting module 1 controls the LED indicator 13 in the corresponding functional module 2 to light up to indicate the real-time operation step of the current program.
The starting module 1 is a programming end main controller, supplies power through a built-in power supply or an external power supply, supplies power to each functional module 2 of the programming end through interfaces on four sides of the module, and the parameter module 3 is superposed on the functional module 2. The main control module 4 is an execution end main controller, supplies power through a built-in power supply, and supplies power to the interface unit 5 through interfaces on two sides of the module. The communication between the starting module 1 and the main control module 4 is performed in a wireless mode (such as WiFi or Bluetooth) so that the programming end and the execution end are separated from the limitation of physical connection.
Different sizes of functional modules 2 and parameter modules 3 (see in particular figures 3 to 5) are used in the present programming system and they are separated between different physical axes. The functional module 2 is placed on a horizontal two-dimensional plane and the parameter module 3 is placed on a vertical plane, i.e. the parameter module 3 is superimposed on the functional module 2. Placing the functional modules 2 on a horizontal plane allows multithreading at each point in the program, which is also important for a simple program that wishes to activate different motors independently in different events of the program (since each functional module 2 has exactly the same interface on four sides, thus physically providing the possibility of multithreading at each point). Furthermore, the use of the vertical plane of the parameter module 3 may result in a clear correlation between the physical vertical dimension of the functional module 2 during implementation and its quantized representation.
In the programming system, the parameter modules 3 corresponding to each functional module 2 are different, in order to prevent compiling errors caused by the fact that the wrong parameter module 3 is placed on the non-corresponding functional module 2, a pattern 21 (shown in figure 5) related to the physical meaning of each functional module 2 is printed, the appearance of the corresponding parameter module 3 is consistent with the outline design of the pattern, the same pattern is printed, and the meaning mark represented by the parameter module 3 is added, so that the programming sequence formed by the various functional modules 2 and the corresponding parameter modules 3 is clear and visualized in logic. Through the cooperation among the starting module 1, the functional module 2, the parameter module 3, the main control module 4 and the interface unit 5, the programming language materialization building block programming system can realize the following basic 'programming elements' learning: real-time debugging, looping, random assignment, conditional instruction, multithreading, syntax error prevention, logic error prevention, race conditions, and the like.
The present programming system allows two-way communication between the main control module 4 and the start module 1, and between the start module 1 and the function modules 2 during program operation, so that at any given operation time, the user can know which function module 2 is operating in real time by means of the LED indicator lights 13 provided on the respective modules, for example, when a certain function module 2 is activated, the LED indicator lights 13 on the function modules 2 are lit up. The four sides of each functional module 2 are provided with completely same interfaces, and the functional modules 2 can be horizontally stacked into different shapes; the starting module 1 and the functional module 2 can be connected from different side directions and form different overall shapes, as shown in fig. 1.
The programming language materialized building block programming system materializes a programming language and a programming environment, and completes programming teaching and engineering application by applying a building block with a programming function, and comprises main elements of written programming languages such as Java, C + + and the like, such as: functions, parameters, conditions, circulation and the like, and by distinguishing the functions from the parameters and combining the parameters with the functions, the programming language is materialized in a building block combination mode. The programming language materialized building block programming system can be completely separated from a computer or a tablet personal computer, does not depend on a software programming environment running on the computer, can be combined with building block toys familiar to children, is interesting, and can teach through lively activities. And the programming language materialization building block programming system is provided with a physical programming interface of a multithread command sequence, functions and parameters are distinguished by separating the functions and the parameters into different planes (horizontal and vertical), and the quantized sizes of the parameters and the functions thereof are related to the physical appearance and the sizes thereof. The association between functionality and physical appearance also makes possible an automatic error prevention system through a one-to-one relationship, i.e. each parameter has a unique recipient in the functional module. The system also enables debugging by notifying functional errors through the indicator light, and once the programming (splicing between modules) expressed by the physical building blocks is wrong, the modules can light red to remind the programming mistake, so that the system is simple, clear and popular and easy to understand.
Example 2: a programming language materialization building block programming system.
According to different design functions, the main control module 4, the interface unit 5, the universal building block 6 and corresponding spare and accessory parts can be combined into different shapes so that the execution end can realize the design functions. In order to realize the application of the materialized programming language, the robot needs to be built by building blocks, and then the movement of the robot is controlled by programming. Because the programming is a man-machine interaction language, people and machines need to communicate by means of the programming. Therefore, the parts required for the whole application are divided into two parts: 1) programmed parts, such as: the system comprises a functional module, a parameter module, a main control module, LED lamps, various sensors, a motor and the like; 2) parts for building up robots, such as: universal building blocks such as beams and bricks, shafts, pins, gears, wheels, battery boxes and the like.
As shown in fig. 9, the main control module 4, the interface unit 5, the universal building block 6, the corresponding spare and accessory parts, and the wheels 7 are built into a walking robot cart (execution end), and the main control module 4 and the power supply battery can also be placed inside the cart. In the actual programming process, the control interaction of the corresponding input and output unit can be realized through the main control module 4, when the main control module 4 receives the code uploaded by the programming end, the relevant instruction is independently executed according to the code, for example, by pressing a Play key of the starting module 1 of the programming end, the starting module 1 can communicate and read the assignment of the relevant function module 2 and the parameter module 3 thereof, and debug and compile are performed, for example, if the debugging is interrupted due to a syntax error, the red indicator light 13 of the corresponding function module 2 is turned on, so as to assist in checking and correcting the programming error. When debugging and compiling are correct, the starting module 1 uploads compiled codes to the main control module 4 of the execution end, and then automatic walking of the trolley, turning when touching obstacles, LED flashing, sounding and the like are realized through the control of input and output of the main control module 4.
The above description is a preferred embodiment of the present invention, but the present invention should not be limited to the disclosure of the embodiment and the accompanying drawings, and therefore, all equivalents and modifications that can be accomplished without departing from the spirit of the present invention are within the protection scope of the present invention.