CN110870981A - Electronic building block communication control method and device, electronic equipment and storage medium - Google Patents

Electronic building block communication control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110870981A
CN110870981A CN201811003553.7A CN201811003553A CN110870981A CN 110870981 A CN110870981 A CN 110870981A CN 201811003553 A CN201811003553 A CN 201811003553A CN 110870981 A CN110870981 A CN 110870981A
Authority
CN
China
Prior art keywords
module
functional sub
modules
control module
master control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811003553.7A
Other languages
Chinese (zh)
Inventor
林剑冰
吴超
郭海
余杨帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Maker Works Technology Co ltd
Original Assignee
Shenzhen Maker Works Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Maker Works Technology Co ltd filed Critical Shenzhen Maker Works Technology Co ltd
Priority to CN201811003553.7A priority Critical patent/CN110870981A/en
Publication of CN110870981A publication Critical patent/CN110870981A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63HTOYS, e.g. TOPS, DOLLS, HOOPS OR BUILDING BLOCKS
    • A63H33/00Other toys
    • A63H33/04Building blocks, strips, or similar building parts
    • A63H33/042Mechanical, electrical, optical, pneumatic or hydraulic arrangements; Motors
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63HTOYS, e.g. TOPS, DOLLS, HOOPS OR BUILDING BLOCKS
    • A63H33/00Other toys
    • A63H33/26Magnetic or electric toys
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The invention discloses an electronic building block communication control method which is applied to a system built through electronic building blocks. The method comprises the following steps: in a system built by electronic building blocks, a master control module sends a code distribution instruction to the serially connected functional sub-modules, and the code distribution instruction is used for controlling each functional sub-module to respond; receiving a response message sent to the master control module by the functional sub-module in response to the code distribution instruction; generating different codes for each functional submodule according to the time sequence of receiving the response message; and configuring the generated codes to corresponding functional sub-modules. The invention omits the complicated operation of burning codes of all functional sub-modules in advance in the prior art, and reduces the use threshold of the electronic building block construction for common users.

Description

Electronic building block communication control method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of communication, in particular to an electronic building block communication method and device, electronic equipment and a computer readable storage medium.
Background
In recent years, with the development of science and technology and the demand of education, electronic building blocks capable of establishing communication connection between each other are gradually rising. The electronic building blocks are embodied as different types of electronic modules, such as sound sensor modules, knob adjusting modules, display modules, etc.
The existing electronic building block building system generally adopts a single-bus communication mode to control built electronic building blocks, before the system is built, each electronic building block needs to be fixed and numbered in advance to be burned, then the system is built according to the fixed position of each electronic building block in the built system, the built system needs to pay special attention to the fixed number of each electronic building block and the fixed position of each electronic building block in the built system, the overall function of the system is realized by controlling each electronic building block, the operation process is very complicated, and the use threshold is higher for common users.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
Based on the technical problem, the invention provides an electronic building block communication control method and device, electronic equipment and a computer-readable storage medium.
In the invention, the electronic building block communication control method, the electronic building block communication control device, the electronic equipment and the computer readable storage medium are applied to a system built by the electronic building blocks, the system comprises a master control module and a plurality of functional sub-modules, the master control module and the functional sub-modules exist in the form of the electronic building blocks, and all the functional sub-modules are connected with a serial interface of the master control module in a serial connection mode.
The technical scheme adopted by the invention is as follows:
in one embodiment, an electronic building block communication control method includes: in the system built by the electronic building blocks, the master control module sends a code distribution instruction to the serially connected functional sub-modules, and the code distribution instruction is used for controlling the functional sub-modules to respond; receiving a response message which is sent to the master control module by the functional sub-module in response to the code distribution instruction; generating different codes for each functional submodule according to the time sequence of receiving the response message; and configuring the generated codes to the corresponding functional sub-modules.
Further, before the overall control module sends a code distribution instruction to the functional sub-modules connected in series, the method further includes: and the master control module receives a first communication configuration instruction, and the first communication configuration instruction is used for controlling the master control module to initiate coding distribution on the functional sub-modules.
Further, the electronic building block communication method further includes: taking the code of the functional sub-module corresponding to the executed target action as a receiving end identifier, and generating a function execution instruction carrying the code; and sending the function execution instruction to the serially connected functional sub-modules according to the carried codes, wherein the function execution instruction controls the corresponding functional sub-modules to execute the target action through the carried codes.
Further, before the generating a function execution instruction carrying a code by using the code of the functional sub-module corresponding to the execution target action as a receiving end identifier, the method further includes: and the master control module receives and obtains a second communication configuration instruction through the communication configuration selected by the user control end for the set electronic building block, and the second communication configuration instruction is used for controlling the master control module to initiate action control on the functional sub-modules.
Further, the master control module sends a code distribution instruction to the serially connected functional sub-modules, and the code distribution instruction comprises: and the master control module respectively sends the coding distribution instruction to each serial interface, or broadcasts the coding distribution instruction to all the serial interfaces, so that the coding distribution instruction is transmitted to the connected functional sub-modules through the serial interfaces.
In another embodiment, an electronic building block communication control method includes: in the system built by the electronic building blocks, the functional sub-modules receive a code distribution instruction sent by the master control module, and the code distribution instruction is used for controlling the functional sub-modules to respond; the received coding distribution instruction is forwarded to the next function sub-module connected in series, and a response message is sent to the master control module; and acquiring codes configured for the functional sub-modules by the master control module, and storing the acquired codes so as to respond to the control of the master control module on the functional sub-modules according to the codes.
Further, the electronic building block communication method further includes: receiving a function execution instruction sent by the master control module, wherein the function execution instruction comprises codes of function sub-modules corresponding to the execution target actions; and if the code of the functional sub-module corresponding to the executed target action is matched with the code stored in the functional sub-module, executing the target action described by the functional execution instruction.
Further, the electronic building block communication method further includes: and if the code of the functional sub-module corresponding to the execution target action is different from the code stored in the functional sub-module, forwarding the function execution instruction to the next serially connected functional sub-module.
In one embodiment, an electronic building block communication control device comprises: the code distribution instruction sending module is used for controlling the master control module to send a code distribution instruction to the serially connected functional sub-modules in the system built by the electronic building blocks, and the code distribution instruction is used for controlling the functional sub-modules to respond; a response message receiving module, configured to receive a response message sent to the master control module by the functional sub-module in response to the code allocation instruction; the code generating module is used for generating different codes for each functional submodule according to the time sequence of receiving the response message; and the code configuration module is used for configuring the generated codes to the corresponding functional sub-modules.
In another embodiment, an electronic building block communication control device includes: the code distribution instruction receiving module is used for controlling the functional sub-modules to receive the code distribution instructions sent by the master control module in the system built by the electronic building blocks, and the code distribution instructions are used for controlling the functional sub-modules to respond; the code distribution instruction response module is used for forwarding the received code distribution instruction to the next function sub-module connected in series and sending a response message to the master control module; and the code acquisition module is used for acquiring codes configured for the functional sub-modules by the master control module, storing the acquired codes and responding to the control of the master control module on the functional sub-modules according to the codes.
An electronic device comprising a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-described electronic block communication control methods via execution of the executable instructions.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the electronic building block communication control method of any of the above.
In the technical scheme, the main control module sends the code distribution instruction to the plurality of serially connected functional sub-modules, so that the main control module can receive response messages of the functional sub-modules to the code distribution instruction and automatically distribute different codes to the functional sub-modules according to the time sequence of receiving the response messages, and the complex operation that the codes are required to be burnt in advance on the functional sub-modules in the prior art is omitted.
Meanwhile, because each functional submodule is connected with the serial interface of the master control module in a serial connection mode, the time sequence of the master control module for receiving the response message reflects the position sequence of the functional submodules connected with the master control module, so that the codes of the functional submodules can be associated with the positions of the functional submodules in the building system. In the invention, each functional submodule can be controlled only according to the code corresponding to each functional submodule without paying special attention to the specific position of each functional submodule in the system, thereby reducing the use threshold of electronic building block construction for common users.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of a system built with electronic bricks, according to an exemplary embodiment;
FIG. 2 is a schematic diagram of a functional sub-module shown in an exemplary embodiment;
FIG. 3 is a flow diagram of an electronic block communications control method in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram of a method for electronic block communications control in accordance with another exemplary embodiment;
FIG. 5 is a schematic diagram of a system built with electronic bricks, according to another exemplary embodiment;
FIG. 6 is a block diagram of an electronic block communications control apparatus in accordance with an exemplary embodiment;
fig. 7 is a block diagram of an electronic block communications control apparatus according to another exemplary embodiment.
While specific embodiments of the invention have been shown by way of example in the drawings and will be described in detail hereinafter, such drawings and description are not intended to limit the scope of the inventive concepts in any way, but rather to explain the inventive concepts to those skilled in the art by reference to the particular embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Referring to fig. 1 and 2, fig. 1 is a schematic diagram of a system built by a plurality of electronic bricks (4 shown in fig. 1) according to an exemplary embodiment, and fig. 2 is an exemplary diagram of a functional submodule according to an exemplary embodiment.
As shown in fig. 1, each functional sub-module is connected in series with a serial interface configured in the master control module 100, wherein the master control module 100 and each functional sub-module are in the form of an electronic block.
The functional sub-modules are equipped with a first serial interface 1011 and a second serial interface 1015 for connection with the serial interfaces of the overall control module 100 and/or other functional sub-modules. The Serial interfaces configured by the functional sub-modules and the total control module 100 may be any one or more of RS232 interfaces, RS422 interfaces, DB9 interfaces, DB25 interfaces, USB (Universal Serial Bus), and other common Serial interfaces, and the specific type of the Serial interface is not limited in this application. It should be noted that the two serial interface types used to interconnect the different electronic bricks should be identical.
The functional sub-module is further configured with a control Unit 1013 and other peripheral circuits, wherein the control Unit 1013 may be an MCU (micro controller Unit) or other electronic components with control function, which is not limited herein. The control unit 1013 should be electrically connected with the two serial interfaces configured, so that the control unit 1013 can acquire the control signal initiated by the overall control module 100 and transmit the control signal to the next functional sub-module connected in series; the other peripheral circuits are electrically connected to the control unit 1013, so that the control unit 1013 can process analog/digital signals input by the other peripheral circuits and/or output analog/digital signals to the other peripheral circuits, thereby enabling the functional sub-modules to independently have certain electronic functions.
For example, in the functional sub-module shown in fig. 2, the power input circuit 1012 and the audio input circuit 1014 are electrically connected to the control unit 1013, and the functional sub-module is supplied with an operating voltage through the power input circuit 1012, and an audio signal input by the audio input module 1014 is processed by the control unit 1013, so that the functional sub-module can be independently used as an audio input module for building an electronic block.
The function submodule can also be an electronic module of multiple different types such as a sound sensor module, a knob adjusting module, a display module, a power supply module, a Bluetooth module, a motor module and a steering engine module, and the specific type of the function submodule is not limited in the application.
The main control module 100 is used for controlling each function sub-module connected in series in the system, so as to implement the overall function of the system. The overall control module 100 should also be configured with a control unit 1013 so that the overall control module 100 has the capability of performing communication control on each functional sub-module.
The general control module 100 can also be configured with a communication circuit electrically connected with the control unit 1013, so that an external control device can access the built system, and can perform wired or wireless communication with the general control module 100, so that a user can control the general control module 100 to initiate communication control over each functional sub-module by using the external control device.
It should be understood that the system shown in fig. 1 and the functional sub-modules shown in fig. 2 are only schematic, and that a system built by electronic bricks may also comprise more or fewer components than those shown in fig. 1, or have different components than those shown in fig. 1; the functional sub-modules may include more or fewer components than shown in fig. 2, or have different components than shown in fig. 2.
Fig. 3 is a flowchart illustrating an exemplary embodiment of a communication control method for electronic blocks, which is applied to the system shown in fig. 1, and is particularly applicable to the overall control module shown in fig. 1. As shown in fig. 3, the method may include the steps of:
and 110, in a system built by the electronic building blocks, the master control module sends a code distribution instruction to the serially connected functional sub-modules, and the code distribution instruction is used for controlling the functional sub-modules to respond.
It should be noted that, firstly, the system built by the electronic building block is obtained by matching and freely building a plurality of functional sub-modules under the control of a user by taking the master control module as a center, and the form and the function of the system formed by the electronic building block depend on the types of the functional sub-modules and the assembly relation among the functional sub-modules, but are all matched with the building requirement of the electronic building block of the user.
It should be understood that the master control module and the functional sub-modules are all electronic building blocks, and the form and the function of the system are achieved through mutual cooperation of functions and assembly.
The master control module is used as the center of a system built by the electronic building blocks, and is directly connected with some functional sub-modules in series through a serial port configured by the master control module, and can also realize the series connection between the master control module and other functional sub-modules by means of the functional sub-modules connected in series and the series connection between the functional sub-modules and other functional sub-modules.
In a system built by electronic building blocks, each functional sub-module needs to be controlled according to a code corresponding to each functional sub-module built in the system. In other words, by means of the form of coding, the function sub-module facing the control in the system is indicated, and the control can be accurately applied to the corresponding function sub-module under the action of the coding, so that the accuracy of the system control is ensured.
In the prior art, each functional sub-module needs to be encoded and burned in advance, and the corresponding code of each functional sub-module is fixed and unchanged correspondingly. The fixed code is used for unique marking of the functional sub-module. Because each functional submodule can not usually carry out system building according to the sequence of burning codes, when a user controls a built system, the user needs to pay special attention to the fixed assembly position of each functional submodule in the system and the fixed codes of each functional submodule, and only under the condition that a control instruction completely corresponds to the position and the codes of each controlled functional submodule, the system can be accurately controlled, and the operation process is very complicated. For a common user, the threshold for controlling the building system is higher, and the experience effect is not good.
In this embodiment, each functional submodule is connected with the master control module in a serial connection manner to form a built system, and then codes are automatically distributed to each functional submodule through controlling the master control module, so that the initialization process of the built system is completed, controllability is provided for the freely built system, and the control of a user on the system is conveniently achieved.
Firstly, the master control module sends a coding distribution instruction to each function sub-module connected in series, and the coding distribution instruction is used for controlling each function sub-module to respond to the master control module after receiving the coding distribution instruction.
In an embodiment, when detecting that the working power supply is enabled, the master control module triggers to send a code distribution instruction to each functional sub-module.
For example, the built system comprises a power supply module, the power supply module is used for supplying power to each electronic building block in the system, and when the power supply module starts a power supply function, the master control module is triggered to send a code distribution instruction to each functional submodule.
The main control module sends the coding distribution instruction to the serial interface connected with the functional sub-modules, so that the coding distribution instruction is sequentially transmitted backwards through the functional sub-modules connected in series until the coding distribution instruction is transmitted to the last functional sub-module. For example, in the system shown in fig. 1, the code distribution instruction sent by the overall control module is transmitted sequentially through the first functional sub-module, the second functional sub-module, and the third functional sub-module.
In another embodiment, the master control module sends a code distribution instruction to each functional sub-module after receiving a first communication configuration instruction sent by a user control end of the access system.
The user control end may be a remote controller device, a terminal device, or any other electronic device capable of performing communication control on the built electronic building block, which is not limited herein. The embodiment can select the terminal device as the user control terminal.
The terminal device may specifically be a smart phone, a tablet computer, a notebook computer, a computer, or any other electronic device capable of being operated by an electronic building block client, which is not limited in this embodiment.
The user control end is provided with an inlet for carrying out communication configuration on the built electronic building block, and the inlet can be a key arranged on remote controller equipment or a function button arranged on a client interface of the electronic building block. And after an inlet arranged on the user control end is triggered by user selection, generating a first communication configuration instruction for controlling the master control module to initiate coding distribution on each functional sub-module, and sending the first communication configuration instruction to the master controller. And the master controller sends a coding distribution instruction to each functional sub-module according to the instruction of the first communication configuration instruction.
For each functional sub-module, after receiving the coding distribution instruction sent by the master control module, responding to the control of the coding distribution instruction, and sending a response message to the master control module, wherein the response message is used for indicating the functional sub-module to receive the coding distribution instruction.
The functional sub-module also forwards the received code distribution instruction to the next functional sub-module connected in series with the functional sub-module, and the next functional sub-module repeatedly executes the operation after receiving the code distribution instruction until the code distribution instruction is transmitted to the last functional sub-module. And after the last functional sub-module sends a response message to the master control module, the transmission of the coding distribution instruction is terminated.
As can be easily understood, in the system shown in fig. 1, after receiving the coding allocation instruction sent by the master control module, the first functional sub-module sends a response message 1 to the master control module, and forwards the coding allocation instruction to the second functional sub-module; after receiving the coding distribution instruction, the second functional sub-module sends a response message 2 to the master control module and forwards the coding distribution instruction to the third functional sub-module; and after receiving the coding distribution instruction, the functional sub-module sends a response message 3 to the master control module.
It should be noted that the code allocation command and the response message are transmitted through the serial interface connected between the functional sub-modules.
And step 130, receiving a response message sent by the functional sub-module to the master control module in response to the code distribution instruction.
And 150, generating different codes for each functional submodule according to the time sequence of receiving the response message.
As mentioned above, since the code allocation command is sequentially transmitted between the functional sub-modules connected in series, the time for receiving the code allocation command by each functional sub-module is different. And the time sequence of the code distribution instructions received by the functional sub-modules is distributed from front to back according to the connecting positions between the functional sub-modules and the master control module. Still taking the system shown in fig. 1 as an example, the time sequence of receiving the code allocation instruction by each functional sub-module is as follows: the first function submodule, the second function submodule and the third function submodule.
Similarly, the functional sub-modules which are connected with the master control module in the front position transmit the response message to the master control module earlier to the master control module, so that the time sequence of the response message received by the master control module is the same as the time sequence of the coding and distributing instruction received by each functional sub-module, namely: response message 1, response message 2, response message 3.
The master control module generates different codes for the functional sub-modules sending the response messages according to the time sequence of receiving the response messages, and the generated codes are arranged according to the position relation sequence between the functional sub-modules and the master control module.
For example, in the system shown in fig. 1, the total control module generates a code "1" for the first functional sub-module, a code "2" for the second functional sub-module, and a code "3" for the third functional sub-module according to the time sequence of receiving each response message.
Therefore, the codes distributed by the overall control module to the functional sub-modules can be associated with the position information of the functional sub-modules in the system.
It should be noted that the specific rule that the overall control module generates different codes for each functional sub-module is only an exemplary example provided for facilitating understanding of the present embodiment, and the code generated by the overall control module for the first functional sub-module may also be "01", "11", "1001", and the like, and does not indicate that the present embodiment performs any limitation on this.
Step 170, configuring the generated code to the corresponding functional sub-module.
The master control module needs to send the generated codes to the corresponding functional sub-modules, so that each functional sub-module obtains the corresponding code.
In an embodiment, after receiving a response message sent by a certain functional sub-module, the master control module immediately generates a code, and sends the generated code to a sending end of the response message.
Because the time sequence of the master control module receiving the response message is different, the process of generating the code by the master control module and sending the generated code to the corresponding functional sub-modules can be orderly carried out.
In another embodiment, after receiving all the response messages, the master control module generates a coding sequence according to the time sequence of receiving the response messages, and then sends different codes in the coding sequence to each functional submodule.
Or the master control module transmits the coding sequence to the functional sub-modules connected in series in sequence, and each functional sub-module obtains the corresponding code from the coding sequence and then forwards the coding sequence to the next functional sub-module connected in series.
For each functional sub-module, after the codes distributed by the master control module are obtained, the obtained codes are stored, so that the master control module can respond to the control of each functional sub-module according to the stored codes. Each functional sub-module may store the obtained code in the memory of the configured control unit, or in another configured storage unit, which is not limited herein.
The process of each functional sub-module controlling the master control module according to the code stored in the functional sub-module will be described by the following embodiments, which are not described herein again.
As can be seen from the above, in this embodiment, codes are automatically allocated to each of the serially connected functional sub-modules in the system by controlling the master control module, so that the tedious operation of burning and coding each of the functional sub-modules in advance in the prior art is eliminated. Moreover, codes distributed by the master control module are associated with specific positions of the functional sub-modules in the system, so that when a user controls the set system, the user does not need to pay special attention to the positions of the functional sub-modules in the system, and the use threshold of the user is reduced.
In addition, in the system disclosed in this embodiment, it is possible to flexibly perform modification operations such as deletion, addition, and replacement of each functional sub-module connected in series to the overall control module.
Specifically, after a user changes one or more functional sub-modules in the system, the master control module may be controlled to be powered on again, or an entry for performing communication control on the set electronic building block on the user control terminal is triggered, so that the master control module redistributes codes for the functional sub-modules in the system according to the method described above.
Still taking the system shown in fig. 1 as an example, if the second functional sub-module is deleted, the third functional sub-module is connected in series with the first functional sub-module, the total control module generates a code "1" for the first functional sub-module, and a code "2" for the third functional sub-module. If the second functional sub-module is replaced by a fourth functional sub-module, the code generated by the total control module on the fourth functional sub-module is '2'. If the fifth functional sub-module is added between the second functional sub-module and the third functional sub-module and connected in series, the master control module carries out the encoding of 3 generated by the fifth functional sub-module and the encoding of 4 generated by the third functional sub-module.
Therefore, the method provided by the embodiment enables the method for building the system through the electronic building blocks to be very flexible, and enables the experience effect of the user to be better.
Fig. 4 is a flow chart of a method for electronic block communications in accordance with another exemplary embodiment. As shown in fig. 4, on the basis of the above embodiment, the electronic building block communication method may further include the following steps:
and step 210, taking the code of the functional sub-module corresponding to the executed target action as a receiving end identifier, and generating a function execution instruction carrying the code.
After configuring and coding each of the serially connected functional sub-modules according to the method, the master control module controls each of the functional sub-modules according to the configured codes.
Specifically, after the controlled function sub-module is determined, the master control module obtains a code corresponding to the controlled function sub-module, and takes the code as a receiving end identifier to be carried in the generated function execution instruction. The function execution instruction is used for controlling the controlled function sub-module to execute the target action described by the instruction so as to enable the controlled function sub-module to realize the target function.
The number of the controlled function sub-modules can be one or more, correspondingly, after the master control module obtains the codes corresponding to the controlled function sub-modules, a plurality of function execution instructions are generated to control different controlled function sub-modules.
In an embodiment, the function execution instruction is generated by the overall control module according to the received second communication configuration instruction. The user selects the corresponding entry for triggering the communication configuration of the set electronic building block set by the user control end, so that the user control end generates and sends a second communication configuration instruction to the master control module to control the master control module to initiate action operation on the functional sub-modules, namely control the master control module to execute the contents described in step 210 and step 230.
And if the user triggers to control the plurality of controlled function sub-modules, the second communication configuration instruction generated by the user control end instructs the master control module to generate a plurality of function execution instructions.
It should be noted that the above-mentioned purpose of using the codes of the target function sub-modules as the receiving end identifiers is to determine whether to execute the instruction according to whether the codes carried by the instruction are matched with the codes stored in the instruction after each function sub-module in the system receives the function execution instruction sent by the master control module.
And step 230, sending a function execution instruction to the serially connected functional sub-modules according to the carried codes, wherein the function execution instruction controls the corresponding functional sub-modules to execute target actions through the carried codes.
If one controlled function sub-module is determined, the master control module sends the generated function execution instruction to each function sub-module connected in series, and the function execution instruction can be executed only if the code stored in the master control module is matched with the code carried by the function execution instruction. Correspondingly, the function sub-module executing the function execution instruction is a controlled function sub-module.
For each functional sub-module, after receiving a function execution instruction, the code carried in the function execution instruction needs to be extracted from the function execution instruction, and compared with the code stored in the functional sub-module, and if the code is matched with the code stored in the functional sub-module, the target action described by the function execution instruction is executed.
If the code extracted from the function execution instruction by the function sub-module is different from the code stored in the function sub-module, the function execution instruction is forwarded to the next function sub-module connected in series.
In this embodiment, if a plurality of controlled function sub-modules are determined, the overall control module may send the generated plurality of function execution instructions to each function sub-module in the form of an instruction set. After each functional submodule receives the instruction set, the instruction set is analyzed first to determine whether a target function execution instruction exists in the instruction set, wherein codes carried by the target function execution instruction should be matched with codes stored in the functional submodule. If the instruction exists, the functional submodule acquires and executes the function execution instruction, and forwards the instruction set to the next functional submodule. If not, the functional sub-module directly forwards the instruction set to the next functional sub-module.
Therefore, in the embodiment, the codes of the functional sub-modules corresponding to the executed target actions are taken as the receiving end identifiers to be carried in the function execution instructions, so that the functional sub-modules connected in series in the system can be accurately controlled, and the whole system can be controlled to realize the corresponding target actions.
As an expandable implementation, the overall control module may be configured with a plurality of serial interfaces, each of which may be connected with a single or a plurality of serially connected functional sub-modules, and refer to the system shown in fig. 5 in particular.
In the system shown in fig. 5, the codes corresponding to the functional sub-modules are still automatically distributed through the overall control module.
In one embodiment, the overall control module sends coded distribution instructions to a designated serial interface or interfaces. And if the code distribution instruction is appointed to be sent to the plurality of serial interfaces, the code distribution instruction is respectively sent to each serial interface according to the appointed sequence so as to carry out code distribution on the functional sub-modules which are connected in series on the master control module.
The designated sequence of the master control module for sending the coding distribution instructions to the plurality of serial interfaces is preset by the master control module. Specifically, the control unit configured by the master control module can define the interface sequence of all serial interfaces electrically connected with the master control module, and the defined interface sequence is used as a designated sequence for sending the code distribution instruction.
For example, in the total control module shown in fig. 5, the serial interfaces connected to the control unit are defined as serial interface 1, serial interface 2, serial interface 3, and serial interface 4, respectively, and when the total control module sends the code allocation instruction, the total control module sends the code allocation instruction sequentially according to the sequence of serial interfaces 1 to 4, respectively.
And after the master control module codes the distribution instruction according to the designated sequence, distributing codes for the functional sub-modules according to response messages returned by the functional sub-modules. It should be noted that, when the master control module allocates codes to each functional sub-module, the interface sequence defined by the control unit and the time sequence of the master control module receiving the response messages returned by each functional sub-module through each serial interface need to be considered at the same time.
To facilitate understanding, and as illustrated in fig. 5, the master control module first performs code allocation on the light sensor module and the sound sensor module connected to the serial interface 1, and according to the time sequence of the master control module receiving the response message through the serial interface 1, the master control module may allocate a code "1" to the light sensor module and allocate a code "2" to the sound sensor module. Then, according to the method, the master control module respectively allocates codes '3', '4' and '5' to the audio module, the display module and the knob adjusting module which are connected with the serial interface 2, allocates a code '6' to the Bluetooth module connected with the serial interface 3, allocates a code '7' to the steering engine module connected with the serial interface 4 and allocates a code '8' to the motor module.
In yet another embodiment, the overall control module broadcasts the coded allocation instructions to all serial interfaces to send the coded allocation instructions to each serial interface simultaneously.
In practical application, each serial interface configured by the master control module is often defined by the control unit in advance, and after the master control module broadcasts a code allocation instruction, codes are automatically allocated to each functional sub-module according to the code allocation method described in the above embodiment, which is not described herein again.
Therefore, in the extended embodiment shown in fig. 5, a plurality of functional sub-modules are distributed to be connected in series with each serial interface of the master control module, so that an electronic building block system with high complexity can be built, the experience of a user is further improved, and the problem that the working voltage of each functional sub-module is insufficient due to partial pressure of each serially connected functional sub-module can be solved to a certain extent.
Fig. 6 is a block diagram of an electronic block communication control device according to an exemplary embodiment. As shown in fig. 6, the apparatus includes a code allocation instruction transmitting module 310, a response message receiving module 330, a code generating module 350, and a code configuring module 370.
The code distribution instruction sending module 310 is configured to, in a system built by electronic building blocks, control the master control module to send a code distribution instruction to the serially connected functional sub-modules, where the code distribution instruction is used to control the functional sub-modules to respond.
The response message receiving module 330 is used for receiving a response message sent by the functional sub-module to the overall control module in response to the code allocation instruction.
The code generating module 350 is configured to generate different codes for each functional sub-module according to the time sequence of receiving the response message.
The code configuration module 370 is used for configuring the generated codes to corresponding functional sub-modules.
In an exemplary embodiment, the apparatus further includes a first communication configuration instruction obtaining module, where the first communication configuration instruction receiving module is configured to control the overall control module to receive the first communication configuration instruction, and the first communication configuration instruction is configured to control the overall control module to initiate encoding and distributing on the functional sub-modules. The first communication configuration instruction is sent out through the communication configuration selected by the user control end on the set electronic building block.
In an exemplary embodiment, the apparatus further includes a function execution instruction generation module and a function execution instruction transmission module.
The function execution instruction generation module is used for controlling the master control module to take the codes of the function sub-modules corresponding to the executed target actions as the receiving end identifiers, and generating the function execution instructions carrying the codes.
The function execution instruction sending module is used for controlling the master control module to send a function execution instruction to the serially connected function sub-modules according to the carried codes, and the function execution instruction controls the corresponding function sub-modules to execute target actions through the carried codes.
In an exemplary embodiment, the device further includes a second communication configuration instruction obtaining module, where the second communication configuration instruction obtaining module is configured to control the overall control module to receive and obtain a second communication configuration instruction, and the second communication configuration instruction is configured to control the overall control module to initiate action control on the functional sub-module. And the second communication configuration instruction is also sent out through the communication configuration selected by the user control end on the set electronic building block.
In an exemplary embodiment, the code distribution instruction sending module 310 is configured to control the overall control module to send a code distribution instruction to each serial interface respectively, or broadcast a code distribution instruction to all serial interfaces, so that the code distribution instruction is transmitted to the connected functional sub-modules via the serial interfaces.
Fig. 7 is a block diagram of an electronic block communication control device according to another exemplary embodiment. As shown in fig. 6, the apparatus includes a code allocation instruction receiving module 410, a code allocation instruction response module 430, and a code acquiring module 450.
The code distribution instruction receiving module 410 is configured to, in a system built by electronic building blocks, receive a code distribution instruction sent by the master control module by the control function sub-module, where the code distribution instruction is used for the control function sub-module to respond.
The code distribution instruction response module 430 is configured to forward the received code distribution instruction to the next function sub-module connected in series, and send a response message to the total control module.
The code acquiring module 450 is configured to acquire codes configured by the master control module for the functional sub-modules, store the acquired codes, and respond to the control of the master control module on the functional sub-modules according to the codes.
In another exemplary embodiment, the apparatus further includes a function execution instruction receiving module and a function execution instruction responding module.
The function execution instruction receiving module is used for controlling the function sub-modules to receive the function execution instruction sent by the master control module, and the function execution instruction comprises codes of the function sub-modules corresponding to the executed target action
And the function execution instruction response module is used for controlling the function sub-module to execute the target action described by the function execution instruction when the code of the function sub-module corresponding to the executed target action is matched with the code stored in the function sub-module.
In another exemplary embodiment, the apparatus further includes a function execution instruction forwarding module, where the function execution instruction forwarding module is configured to, when the code of the function sub-module corresponding to the execution target action is different from the code stored in the function sub-module, control the function sub-module to forward the function execution instruction to the next function sub-module connected in series.
It should be noted that the apparatus provided in the foregoing embodiment and the method provided in the foregoing embodiment belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiment, and is not described again here.
In an exemplary embodiment, an electronic device includes a processor and a memory, wherein the processor is configured to execute any one of the electronic block communication control methods described above.
In an exemplary embodiment, a computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements an electronic building block communication control method as set forth in any one of the above.
The above description is only a preferred exemplary embodiment of the present application, and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. The electronic building block communication control method is applied to a system built through electronic building blocks, the system comprises a master control module and a plurality of functional sub-modules, the master control module and the functional sub-modules exist in the form of electronic building blocks, and the functional sub-modules are connected with serial interfaces of the master control module in a serial connection mode, and the method comprises the following steps:
in the system built by the electronic building blocks, the master control module sends a code distribution instruction to the serially connected functional sub-modules, and the code distribution instruction is used for controlling the functional sub-modules to respond;
receiving a response message which is sent to the master control module by the functional sub-module in response to the code distribution instruction;
generating different codes for each functional submodule according to the time sequence of receiving the response message;
and configuring the generated codes to the corresponding functional sub-modules.
2. The method of claim 1, wherein before the overall control module sends the coded assignment instructions to the functional sub-modules, the method further comprises:
and the master control module receives a first communication configuration instruction, and the first communication configuration instruction is used for controlling the master control module to initiate coding distribution on the functional sub-modules.
3. The method of claim 1, further comprising:
taking the code of the functional sub-module corresponding to the executed target action as a receiving end identifier, and generating a function execution instruction carrying the code;
and sending the function execution instruction to the serially connected functional sub-modules according to the carried codes, wherein the function execution instruction controls the corresponding functional sub-modules to execute the target action through the carried codes.
4. The method according to claim 3, wherein before the generating a function execution instruction carrying a code by using the code of the functional sub-module corresponding to the execution target action as a receiving end identifier, the method further comprises:
and the master control module receives and obtains a second communication configuration instruction through the communication configuration selected by the user control end for the set electronic building block, and the second communication configuration instruction is used for controlling the master control module to initiate action control on the functional sub-modules.
5. The method according to claim 4, wherein in the system built by the electronic building blocks, the master control module sends a code distribution instruction to the function sub-modules connected in series, and the method comprises the following steps:
and the master control module respectively sends the coding distribution instruction to each serial interface, or broadcasts the coding distribution instruction to all the serial interfaces, so that the coding distribution instruction is transmitted to the connected functional sub-modules through the serial interfaces.
6. The electronic building block communication control method is applied to a system built through electronic building blocks, the system comprises a master control module and a plurality of functional sub-modules, the master control module and the functional sub-modules exist in the form of electronic building blocks, and the functional sub-modules are connected with serial interfaces of the master control module in a serial connection mode, and the method comprises the following steps:
in the system built by the electronic building blocks, the functional sub-modules receive a code distribution instruction sent by the master control module, and the code distribution instruction is used for controlling the functional sub-modules to respond;
the received coding distribution instruction is forwarded to the next function sub-module connected in series, and a response message is sent to the master control module;
and acquiring codes configured for the functional sub-modules by the master control module, and storing the acquired codes so as to respond to the control of the master control module on the functional sub-modules according to the codes.
7. The method of claim 6, further comprising:
receiving a function execution instruction sent by the master control module, wherein the function execution instruction comprises codes of function sub-modules corresponding to the execution target actions;
and if the code of the functional sub-module corresponding to the executed target action is matched with the code stored in the functional sub-module, executing the target action described by the functional execution instruction.
8. The method of claim 7, further comprising:
and if the code of the functional sub-module corresponding to the execution target action is different from the code stored in the functional sub-module, forwarding the function execution instruction to the next serially connected functional sub-module.
9. The utility model provides an electronic toy communication control device, its characterized in that, the system of putting up through electronic toy is applied to the device, the system includes total control module and a plurality of function submodule piece, total control module and a plurality of function submodule piece all exist with electronic toy's form, each function submodule piece through concatenating the mode with total control module's serial interface is connected, the device includes:
the code distribution instruction sending module is used for controlling the master control module to send a code distribution instruction to the serially connected functional sub-modules in the system built by the electronic building blocks, and the code distribution instruction is used for controlling the functional sub-modules to respond;
a response message receiving module, configured to receive a response message sent to the master control module by the functional sub-module in response to the code allocation instruction;
the code generating module is used for generating different codes for each functional submodule according to the time sequence of receiving the response message;
and the code configuration module is used for configuring the generated codes to the corresponding functional sub-modules.
10. The utility model provides an electronic toy communication control device, its characterized in that, the system of putting up through electronic toy is applied to the device, the system includes total control module and a plurality of function submodule piece, total control module and a plurality of function submodule piece all exist with electronic toy's form, each function submodule piece through concatenating the mode with total control module's serial interface is connected, the device includes:
the code distribution instruction receiving module is used for controlling the functional sub-modules to receive the code distribution instructions sent by the master control module in the system built by the electronic building blocks, and the code distribution instructions are used for controlling the functional sub-modules to respond;
the code distribution instruction response module is used for forwarding the received code distribution instruction to the next function sub-module connected in series and sending a response message to the master control module;
and the code acquisition module is used for acquiring codes configured for the functional sub-modules by the master control module, storing the acquired codes and responding to the control of the master control module on the functional sub-modules according to the codes.
11. An electronic device, characterized in that the device comprises:
a processor;
memory having stored thereon computer-readable instructions which, when executed by the processor, implement the electronic building block communication control method of any of claims 1 to 8.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for communication control of electronic building blocks according to any one of claims 1 to 8.
CN201811003553.7A 2018-08-30 2018-08-30 Electronic building block communication control method and device, electronic equipment and storage medium Pending CN110870981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811003553.7A CN110870981A (en) 2018-08-30 2018-08-30 Electronic building block communication control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811003553.7A CN110870981A (en) 2018-08-30 2018-08-30 Electronic building block communication control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110870981A true CN110870981A (en) 2020-03-10

Family

ID=69715533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811003553.7A Pending CN110870981A (en) 2018-08-30 2018-08-30 Electronic building block communication control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110870981A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111371529A (en) * 2018-12-26 2020-07-03 深圳市优必选科技有限公司 Code distribution method and device, master control equipment and storage medium
CN112394959A (en) * 2020-11-18 2021-02-23 深圳市元征科技股份有限公司 Tire pressure sensor upgrading method, handheld tire pressure tool and tire pressure sensor
CN114488859A (en) * 2021-12-21 2022-05-13 深圳市优必选科技股份有限公司 Electronic building block control circuit, electronic building block and electronic building block system
CN117245646A (en) * 2022-12-12 2023-12-19 北京小米机器人技术有限公司 Robot and debugging method and device thereof as well as storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102302854A (en) * 2011-05-24 2012-01-04 深圳市合智创盈电子有限公司 Electronic building block combination system
CN106160420A (en) * 2016-08-24 2016-11-23 广东乐博士教育装备有限公司 Distributed power supply system for modularization intelligent electronic building blocks
CN106230195A (en) * 2016-08-24 2016-12-14 汕头市万格文教科技实业有限公司 A kind of programmable motor module for smart electronics building blocks and control method thereof
CN107067836A (en) * 2016-11-28 2017-08-18 北京邮电大学 A kind of electronic building blocks learning device, system and method based on intelligent terminal
CN107817720A (en) * 2017-10-24 2018-03-20 深圳市创客工场科技有限公司 A kind of steering gear control system and method
CN108022486A (en) * 2016-11-03 2018-05-11 梦孚(上海)教育科技有限公司 Programmable free splicing electronic building blocks module
US10183227B2 (en) * 2017-02-18 2019-01-22 Yu-Wei Chen Electronic building block set with metal layer on outer surface of each building block

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102302854A (en) * 2011-05-24 2012-01-04 深圳市合智创盈电子有限公司 Electronic building block combination system
CN106160420A (en) * 2016-08-24 2016-11-23 广东乐博士教育装备有限公司 Distributed power supply system for modularization intelligent electronic building blocks
CN106230195A (en) * 2016-08-24 2016-12-14 汕头市万格文教科技实业有限公司 A kind of programmable motor module for smart electronics building blocks and control method thereof
CN108022486A (en) * 2016-11-03 2018-05-11 梦孚(上海)教育科技有限公司 Programmable free splicing electronic building blocks module
CN107067836A (en) * 2016-11-28 2017-08-18 北京邮电大学 A kind of electronic building blocks learning device, system and method based on intelligent terminal
US10183227B2 (en) * 2017-02-18 2019-01-22 Yu-Wei Chen Electronic building block set with metal layer on outer surface of each building block
CN107817720A (en) * 2017-10-24 2018-03-20 深圳市创客工场科技有限公司 A kind of steering gear control system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111371529A (en) * 2018-12-26 2020-07-03 深圳市优必选科技有限公司 Code distribution method and device, master control equipment and storage medium
CN111371529B (en) * 2018-12-26 2022-11-29 深圳市优必选科技有限公司 Code distribution method and device, master control equipment and storage medium
CN112394959A (en) * 2020-11-18 2021-02-23 深圳市元征科技股份有限公司 Tire pressure sensor upgrading method, handheld tire pressure tool and tire pressure sensor
CN114488859A (en) * 2021-12-21 2022-05-13 深圳市优必选科技股份有限公司 Electronic building block control circuit, electronic building block and electronic building block system
CN117245646A (en) * 2022-12-12 2023-12-19 北京小米机器人技术有限公司 Robot and debugging method and device thereof as well as storage medium

Similar Documents

Publication Publication Date Title
CN110870981A (en) Electronic building block communication control method and device, electronic equipment and storage medium
CN111203874B (en) Robot control method, device, electronic device and storage medium
CN108462619B (en) Method, device and storage medium for controlling household appliances through instant messaging software
CN103945046A (en) Photographing control method and control device
CN105282583B (en) A kind of remote controler intelligent Matching system and implementation method
TWI505721B (en) Smart home network system and method for registering household electronic device
CN107659440B (en) Rapid network distribution method and intelligent hardware
CN109327837A (en) Distribution method, apparatus, terminal device and distribution network systems
CN108230661A (en) Infrared remote control system, infrared remote control method, infrared electronic whiteboard and storage medium
TWM452554U (en) Smart home network system and its smart gateway
CN103702158A (en) Integrated control method for display system and display device
CN104376711A (en) Method and device for rapidly configuring infrared remote control at mobile terminal
CN110221789A (en) A kind of Method of printing, device, user terminal and computer readable storage medium
CN109542250B (en) Inter-server switching control method, KVM video processor and spliced wall system
CN107219780B (en) Control method of controlled device, control device, configuration method of control device and terminal
CN106406584A (en) Control method of interactive equipment and instruction response method and device
US11003173B2 (en) Identifier (ID) based communication system
CN109375786B (en) Method and system for controlling remote PC desktop based on physical keyboard and mouse equipment
CN103813194A (en) Information processing method and electronic device
CN104146585A (en) Cooking system
US20170179746A1 (en) Battery shutdown method and device and mobile terminal
CN107834639B (en) Power supply method, power supply device, electronic cigarette and intelligent power supply
CN104506956A (en) Method for setting intelligent television system
CN110930681B (en) Remote meter reading main equipment and remote meter reading system
CN209861130U (en) Conversion device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200310