CN113760456A - Web-based Microbit intelligent hardware control method and system - Google Patents

Web-based Microbit intelligent hardware control method and system Download PDF

Info

Publication number
CN113760456A
CN113760456A CN202111009338.XA CN202111009338A CN113760456A CN 113760456 A CN113760456 A CN 113760456A CN 202111009338 A CN202111009338 A CN 202111009338A CN 113760456 A CN113760456 A CN 113760456A
Authority
CN
China
Prior art keywords
intelligent hardware
microbit
web
interface
web client
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
CN202111009338.XA
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.)
Hainan Jiada Technology Co ltd
Original Assignee
Hainan Jiada 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 Hainan Jiada Technology Co ltd filed Critical Hainan Jiada Technology Co ltd
Priority to CN202111009338.XA priority Critical patent/CN113760456A/en
Publication of CN113760456A publication Critical patent/CN113760456A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The invention provides a Web-based micro intelligent hardware control method and system, which comprises Scratch software, wherein the method is applied to a Web-based micro intelligent hardware control system, the system comprises a Web client, a WebSerial API interface and micro intelligent hardware, the Web client establishes data connection with the micro intelligent hardware through the WebSerial API interface, and the method comprises the following steps: s1: a Scratch interface is constructed through Scratch software; s2: pulling the splicing assembly through a Scratch interface to form a complete splicing original shape; s3: mapping the spliced original shape to a Web client through a virtual machine; and S4, the Web client sends a data instruction to the micro intelligent hardware through the WebSerial API, so that the Web client finishes controlling the micro intelligent hardware. According to the invention, when the Microbit is used, a third-party hardware assistant is not required to be installed and updated, and the method is simpler and more convenient in an education and training scene, especially in a school machine room with a recovery system, so that the efficiency of Microbit teaching is greatly improved, and the operation threshold of students is reduced.

Description

Web-based Microbit intelligent hardware control method and system
Technical Field
The invention relates to the technical field of management systems, in particular to a Web-based Microbit intelligent hardware control method and a Web-based Microbit intelligent hardware control system.
Background
Scratch is a simple graphical programming tool based on web developed by MIT of the massachusetts institute of technology, and many companies developed twice based on Scratch in China need users to install a hardware connection assistant or a Scratch Link in a manner of controlling the micro intelligent hardware in real time, which causes great troubles for school teaching scenes.
The invention aims to solve the problem, save the installation of the Scratch Link or a hardware assistant, simplify the flow and improve the efficiency and the performance of controlling the intelligent hardware of the micro bit.
Disclosure of Invention
Therefore, the present invention is directed to a method and a system for controlling a Web-based Microbit intelligent hardware, so as to at least solve the above problems.
The technical scheme adopted by the invention is as follows:
a Web-based micro intelligent hardware control method comprises Scratch software and is characterized in that the method is applied to a Web-based micro intelligent hardware control system, the system comprises a Web client, a WebSerial API interface and micro intelligent hardware, the Web client establishes data connection with the micro intelligent hardware through the WebSerial API interface, and the method comprises the following steps:
s1: a Scratch interface is constructed through Scratch software;
s2: pulling the splicing assembly through a Scratch interface to form a complete splicing original shape;
s3: mapping the spliced original shape to a Web client through a virtual machine;
and S4, the Web client sends a data instruction to the micro intelligent hardware through the WebSerial API, so that the Web client finishes controlling the micro intelligent hardware.
Further, the virtual machine renders the stitched primitives before they are mapped by the virtual machine
Further, the operation logic of the splicing prototype is managed by the virtual machine.
Furthermore, before the data interaction between the WebSerial API interface and the Microbit intelligent hardware is carried out, the Web client marks the WebSerial API interface through the filter, and the Microbit intelligent hardware can carry out data connection through a mark recognition party of the WebSerial API interface.
Furthermore, data connection is carried out between the Microbit intelligent hardware and the Web client side through a USB.
Further, ajax is adopted to carry out asynchronous request in the process of mapping the splicing primitive to the Web client through the virtual machine.
Further, the WebSerial API interface is provided with a public interface key and a private interface key, the public interface key is used for connecting with an external developer center, and the private interface key is used for connecting with an internal developer center.
Further, the USB flash disk comprises a Microbit firmware, wherein the Microbit firmware is arranged between the Microbit intelligent hardware and the USB flash disk, and is used for sending a hardware instruction to the Microbit intelligent hardware.
Correspondingly, the invention also provides a Web-based micro intelligent hardware control system, which is used for executing the method of any one of claims 1 to 8 and comprises a Web client, a WebSerial API interface and micro intelligent hardware, wherein the Web client establishes data connection with the micro intelligent hardware through the WebSerial API interface.
Compared with the prior art, the invention has the beneficial effects that:
compared with the mode that an official Microbit controls the Microbit in real time when the official Microbit is connected with the intelligent hardware, the mode that the MIT official Bluetooth BLE controls the Microbit in real time or the mode that other secondary development companies control the Microbit in real time by using the USB requires a user to install a Scratch Link or a hardware assistant, which causes great trouble for a school teaching scene. The invention aims to solve the problem, and the WebSerial API interface is connected with the micro intelligent hardware, so that the installation of a Scratch Link or a hardware assistant is omitted, the flow is simplified, and the efficiency and the performance of controlling the micro intelligent hardware can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is apparent that the drawings in the following description are only preferred embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive efforts.
Fig. 1 is a schematic overall flow chart of a Web-based Microbit intelligent hardware control method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of an overall structure of a Web-based Microbit intelligent hardware control system according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, the illustrated embodiments are provided to illustrate the invention and not to limit the scope of the invention.
Referring to fig. 1, the invention provides a Web-based Microbit intelligent hardware control method, which comprises Scratch software, and is characterized in that the method is applied to a Web-based Microbit intelligent hardware control system, the system comprises a Web client, a WebSerial API interface and Microbit intelligent hardware, the Web client establishes data connection with the Microbit intelligent hardware through the WebSerial API interface, and the method comprises the following steps:
s1: a Scratch interface is constructed through Scratch software;
illustratively, when the control of the micro bit intelligent hardware is required, a Scratch interface is constructed through Scratch software, and the Scratch interface can design a part connection original shape of the hardware, so that the connection between a software module and a hardware module of a Web can be established, and the micro bit intelligent hardware is the basis for controlling the micro bit intelligent hardware by the software.
S2: pulling the splicing assembly through a Scratch interface to form a complete splicing original shape;
illustratively, a splicing prototype conforming to splicing logic can be built on the Scratch interface, only the complete splicing prototype can be mapped by the virtual machine, the complete splicing prototype means that no splicing logic error occurs on the Scratch interface, and the splicing component is provided by a class library of Scratch-block hardware control class blocks.
S3: mapping the spliced original shape to a Web client through a virtual machine;
illustratively, the splicing prototype translates the splicing prototype into a machine language which can be recognized by the Web client through a virtual machine, so as to complete the deployment of the Scratch software to the Web client, and the virtual machine is equivalent to the Scratch-vm micro bit expansion in fig. 2.
S4, the Web client sends a data instruction to the micro intelligent hardware through the WebSerial API, so that the Web client finishes controlling the micro intelligent hardware.
Specifically, the virtual machine renders the spliced prototype before the spliced prototype is mapped by the virtual machine, and illustratively, the rendering of the spliced prototype by the virtual machine can enable splicing personnel to visually check the spliced prototype
Specifically, the running logic of the splicing primitive is managed by the virtual machine, and for example, in order to ensure that the splicing primitive is correctly mapped to the Web client, the virtual machine verifies the splicing logic of the splicing primitive and manages the splicing logic.
Specifically, before the WebSerial API interfaces perform data interaction with the micro intelligent hardware, the Web client marks the WebSerial API interfaces through the filter, the micro intelligent hardware can perform data connection through the mark recognition party of the WebSerial API interfaces, illustratively, the filter of the Web client can limit the access of the micro intelligent hardware which does not accord with the access authority to the Web client, and the micro intelligent hardware can only access the Web client through the mark of the WebSerial API interfaces.
Specifically, data connection is performed between the Microbit intelligent hardware and the Web client through the USB, and for example, in order to perform data connection between the software and the hardware quickly, the USB may be used to perform data connection between the software and the hardware.
Specifically, ajax is adopted to carry out asynchronous request in the process of mapping the splicing primitive shapes to the Web client through the virtual machine, illustratively, ajax is adopted to carry out asynchronous request in order to ensure that a plurality of splicing primitive shapes can be stably mapped on the Web client, and the load pressure of the virtual machine is relieved.
The WebSerial API interface is provided with a public interface secret key and a private interface secret key, the public interface secret key is used for being connected with an external developer center, the private interface secret key is used for being connected with an internal developer center, exemplarily, in order to enrich the class library of the WebSerial API interface and meet various requirements of clients, the external developer center can expand the WebSerial API interface in a public interface secret key mode, and the internal developer center expands the WebSerial API interface through the private interface secret key and modifies the class library which is expanded by the external developer center and does not meet requirements.
The embodiment further comprises a micro bit firmware, wherein the micro bit firmware is arranged between the micro bit intelligent hardware and the USB, and is used for sending a hardware instruction to the micro bit intelligent hardware. Illustratively, the splicing original shape from the Web client can be better preloaded through the Microbit firmware, so that the Web client can be quickly connected to the Microbit intelligent hardware, and the control on the Microbit intelligent hardware is completed.
Correspondingly, the invention also provides a Web-based micro intelligent hardware control system, which is used for executing the method and comprises a Web client, a WebSerial API interface and micro intelligent hardware, wherein the Web client establishes data connection with the micro intelligent hardware through the WebSerial API interface.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A Web-based micro bit intelligent hardware control method comprises Scratch software and is characterized in that the method is applied to a Web-based micro bit intelligent hardware control system, the system comprises a Web client, a WebSerialAPI interface and micro bit intelligent hardware, the Web client establishes data connection with the micro bit intelligent hardware through the WebSerialAPI interface, and the method comprises the following steps:
s1: a Scratch interface is constructed through Scratch software;
s2: pulling the splicing assembly through a Scratch interface to form a complete splicing original shape;
s3: mapping the spliced original shape to a Web client through a virtual machine;
and S4, the Web client sends a data instruction to the micro intelligent hardware through the WebSerial API, so that the Web client finishes controlling the micro intelligent hardware.
2. The method and system for Web-based Microbit intelligent hardware control according to claim 1, wherein the virtual machine renders the spliced primitives before the spliced primitives are mapped by the virtual machine.
3. The Web-based Microbit intelligent hardware control method and system according to claim 1, wherein the running logic of the spliced prototype is managed by a virtual machine.
4. The Web-based micro intelligent hardware control method and system according to claim 1, wherein before data interaction between the WebSerial API interface and the micro intelligent hardware, the Web client labels the WebSerial API interface through a filter, and the micro intelligent hardware can perform data connection through a label recognition party of the WebSerial API interface.
5. The Web-based Microbit intelligent hardware control method and system according to claim 4, wherein data connection is made between the Microbit intelligent hardware and the Web client via USB.
6. The method and system for Web-based Microbit intelligent hardware control according to claim 1, wherein asynchronous requests are made using ajax during the process of mapping the splice primitive to the Web client via the virtual machine.
7. The Web-based Microbit intelligent hardware control method and system according to claim 1, wherein the WebSerial API interface is provided with a public interface key and a private interface key, the public interface key is used for connecting an external developer center, and the private interface key is used for connecting an internal developer center.
8. The Web-based Microbit intelligent hardware control method according to claim 5, comprising a Microbit firmware, wherein the Microbit firmware is arranged between the Microbit intelligent hardware and the USB, and the Microbit firmware is used for sending a hardware instruction to the Microbit intelligent hardware.
9. A Web-based Microbit intelligent hardware control system, characterized in that the system is used for executing the method of any one of claims 1 to 8, the system comprises a Web client, a WebSerial API interface and Microbit intelligent hardware, and the Web client establishes data connection with the Microbit intelligent hardware through the WebSerial API interface.
CN202111009338.XA 2021-08-31 2021-08-31 Web-based Microbit intelligent hardware control method and system Pending CN113760456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111009338.XA CN113760456A (en) 2021-08-31 2021-08-31 Web-based Microbit intelligent hardware control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111009338.XA CN113760456A (en) 2021-08-31 2021-08-31 Web-based Microbit intelligent hardware control method and system

Publications (1)

Publication Number Publication Date
CN113760456A true CN113760456A (en) 2021-12-07

Family

ID=78792056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111009338.XA Pending CN113760456A (en) 2021-08-31 2021-08-31 Web-based Microbit intelligent hardware control method and system

Country Status (1)

Country Link
CN (1) CN113760456A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933624A (en) * 2017-02-22 2017-07-07 深圳充电网科技有限公司 A kind of Intelligent hardware control system and control method
US20180007189A1 (en) * 2014-12-29 2018-01-04 Beijing Qihoo Technology Company Limited Method and apparatus for implementing unified management of intelligent hardware devices by app, and client
CN211427673U (en) * 2020-01-20 2020-09-04 浙江酷哥创客教育科技有限公司 Microbit expansion board teaching aid

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180007189A1 (en) * 2014-12-29 2018-01-04 Beijing Qihoo Technology Company Limited Method and apparatus for implementing unified management of intelligent hardware devices by app, and client
CN106933624A (en) * 2017-02-22 2017-07-07 深圳充电网科技有限公司 A kind of Intelligent hardware control system and control method
CN211427673U (en) * 2020-01-20 2020-09-04 浙江酷哥创客教育科技有限公司 Microbit expansion board teaching aid

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
魏星: "基于B/S架构的预约挂号系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Similar Documents

Publication Publication Date Title
CN101751273B (en) Safety guide device and method for embedded system
DE69829218D1 (en) AN AUDIO VIDEO HOME NETWORK WITH DEVICE CONTROL
CN104408984A (en) Intelligent teaching system comprising multiple teaching terminals
CN101539903A (en) Method for realizing software compatible with documents in various formats
CN104765603A (en) Application program building method and device
CN102650952A (en) Modeling tool order calling method and system based on MVC framework
CN101694635A (en) Control method and system based on virtual tape library backup and near-line storage node
CN104778022A (en) Data processing method and electronic equipment
WO2023093016A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
CN101083558B (en) Method and apparatus for generating network element equipment simulation image
CN111163149A (en) Intelligent contract platform method based on block chain
CN107817962A (en) A kind of long-range control method, device, control server and storage medium
CN113760456A (en) Web-based Microbit intelligent hardware control method and system
CN109543415A (en) A kind of secure operating system framework
WO2015131553A1 (en) Data transmission method and system
CN100353330C (en) Disk mirroring method based on IP network
CN115129422A (en) Method for creating and releasing virtual machine based on order mode and Activiti technology
US11977850B2 (en) Method for dialogue processing, electronic device and storage medium
CN109343894A (en) A kind of O&M method and apparatus of cloud platform
CN109885420A (en) A kind of analysis method, BMC and the storage medium of PCIe link failure
CN115426370A (en) Heterogeneous container cloud platform and edge manufacturing service subscription implementation method thereof
CN108683873B (en) Control device and method for video conference
CN203618023U (en) Embedded smart cloud terminal system
CN107193635A (en) A kind of method for realizing virtualization content library, apparatus and system
CN103685525A (en) Embedded type smart cloud terminal system and double-screen displaying working method thereof

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