APPARATUS AND METHOD FOR COMPOSING MICRO ROBOT
CONTROL PROGRAM
Technical Field The present invention relates to an apparatus and method for composing a micro-robot control program, and more particularly, to an apparatus and method for producing a micro-robot control program, in which a graphic user interface for editing a program in graphic and text environments is provided for a user to allow him/her to produce a micro-robot control program and the produced micro-robot control program is downloaded to a micro robot so that the micro robot is controlled by the program.
Background Art Recently, with popularization of electronic technology, the public's interests in micro robots increase, and general people have increasingly participated in meetings related to micro robots, such as a micro-mouse contest, a line-tracer contest, and a robot soccer tournament, in which specialists in electronics mainly participated before. In a micro-mouse contest, time taken for each mouse-shaped micro robot to run through a maze from a start place to a destination is measured to compare the performance of each robot. The speed, efficiency of maze solving (processing performance of a program), and self-reliance (mechanical reliability) of the robot are considered. It is a control program processed by a processor that is essential to the function of such a micro robot. A micro robot produces various actions according to the function of the control program and shows different efficiencies in carrying out the same action according to the efficiency of the control program. At present, micro robots are supplied to the public in the form of a
manufacturing kit and may be designed to use a predetermined control program as it is or allow users to reconstruct the control program. When a chip storing a control program for carrying out predetermined functions only is provided together with a micro-robot manufacturing kit, a user can complete a micro robot by welding and assembling a printed circuit board and electronic devices and parts, which are included in the manufacturing kit, according to a manual even though he/she does not know details about electronics.
In contrast, when flexibility is given to installation of electronic parts so that a control program included in a micro-robot manufacturing kit can be changed by a user, the user needs to have much knowledge about electronics. Accordingly, a user can change a control program within an extremely restricted range in conventional micro-robot manufacturing kits. If a user is allowed to easily produce a control program that is essential to a micro robot and download it to the micro robot so that he/she can control the micro robot according to the control program, he/she can sufficiently understand the functions of elements constituting the micro robot and the control program to operate the micro robot in various manners.
Disclosure of the Invention
In order to overcome the above-described problems, it is an object of the present invention to provide an apparatus and method for producing a micro-robot control program, through which even if a user does not have knowledge about electronics, he/she can easily produce a micro-robot control program, apply it to a micro robot to operate, and check the result of application.
To achieve the above object, there is provided an apparatus for producing a micro-robot control program and downloading it to a micro
robot. The apparatus includes an object control program module provider which provides a plurality of object control program modules; a control program editor which includes a graphic editor for expressing one or more object control program modules, which are selected by a user from the object control program modules provided form the object control program module provider, as graphic blocks and a text editor for expressing one or more object control program modules, which are selected by the user from the object control program modules, as text codes so that the user can edit a micro-robot control program; an intermediate code generator which compiles the edited micro-robot control program and generates an intermediate code identifying each micro-robot control program module; and a downloader which downloads the intermediate code or the compiled micro-robot control program.
There is also provided a method for producing a micro-robot control program and downloading it to a micro robot. The method includes the steps of: (a) selecting either a graphic editor for expressing object control program modules as graphic blocks or a text editor for expressing object control program modules as text codes; (b) editing one or more object control program modules selected by a user through the selected editor into a micro-robot control program; (c) compiling the edited micro-robot control program and generating an intermediate code identifying each micro-robot control program module; and (d) downloading the intermediate code or the compiled micro-robot control program.
Brief Description of the Drawings
FIG. 1 is a diagram showing the relationship between a micro-robot control program producing apparatus according to the present invention and a micro robot. FIG. 2 shows an example of a state in which a micro robot that is
downloaded with a control program produced using a micro-robot control program producing apparatus according to the present invention moves.
FIG. 3 is a block diagram showing the entire structure of a preferred embodiment of a micro-robot control program producing apparatus according to the present invention.
FIG. 4A shows a screen of a graphic user interface provided for a user by a graphic editor according to the present invention.
FIG. 4B shows a screen on which the graphic editor edits object control program modules over the graphic user interface according to the present invention.
FIG. 4C shows a screen on which a text editor edits object control program modules on the graphic user interface according to the present invention.
FIG. 5A shows an icon bar for command program modules that are provided to the graphic user interface by an object control program module provider according to the present invention.
FIG. 5B shows an input graphic block that is provided when a user selects and clicks an icon, which is positioned within a tool bar, for driving a motor using a mouse. FIG. 6A shows an icon bar for event program modules that are provided to the graphic user interface by an object control program module provider according to the present invention.
FIG. 6B shows a graphic block that is provided in a graphic edition area when an icon of the OnNear event program module shown in FIG. 6A is clicked.
FIG. 7A shows an icon bar for stack program modules that are provided to the graphic user interface by an object control program modules provider according to the present invention.
FIG. 7B shows a graphic block that is provided in the graphic edition area when an icon of a DoLoop-statement stack program module
shown in FIG. 7A is clicked.
FIG. 8 shows a data stream that is defined by an intermediate code transmission protocol, which a micro-robot control program producing apparatus according to the present invention uses to transmit a micro-robot control program in an intermediate code format to a micro robot.
FIG. 9 is a block diagram of the internal structure of a micro robot, which operates according to a micro-robot control program that is produced according to the present invention, FIG. 10 is a flowchart of a method for producing a micro-robot control program according to the present invention.
FIG. 11 is a flowchart of a method for operating a micro robot according to a micro-robot control program produced according to the present invention.
Best mode for carrying out the Invention
Hereinafter, a preferred embodiment of a micro-robot control program producing apparatus according to the present invention will be described in detail with reference to the attached drawings. FIG. 1 is a diagram showing the relationship between a micro-robot control program producing apparatus 10 according to the present invention and a micro robot 20.
Referring to FIG. 1 , the micro-robot control program producing apparatus 10 according to the present invention is embodied on a computer, which includes micro-robot control program producing software 100 and a data transceiver 200. The micro robot 20 is connected to the data transceiver 200 and receives a micro-robot control program that is produced using the micro-robot control program producing software 100. Then, the micro-robot control program is installed in the micro robot 20 and drives the micro robot 20 by
performing operations on a signal that is generated from a sensor provided in the micro robot 20.
FIG. 2 shows an example of a state in which the micro robot 20 that is downloaded with the control program produced using the micro-robot control program producing apparatus 10 according to the present invention moves.
A user produces a micro-robot control program by editing object program modules using the micro-robot control program producing apparatus 10 and downloads it to the micro robot 20. Then, the micro robot 20 can perform functions such as drawing with a pen, reproducing music, and showing a diorama using light emitting diodes (LEDs). The micro robot 20 can perform a control program having a parallel structure as well as a sequential. For example, the micro robot 20 can react to sound or light while running avoiding obstacles. As described above, the user can control the micro robot 20 to perform various actions by combining object program modules in producing a control program.
The micro-robot control program producing apparatus 10 according to the present invention provides programming tools that allow even a beginner to easily edit control program modules to produce a control program for making the micro robot 20 perform various actions.
FIG. 3 is a block diagram showing the entire structure of a preferred embodiment of the micro-robot control program producing apparatus 10 according to the present invention.
Referring to FIG. 3, the micro-robot control program producing software 100 provides a plurality of object control program modules 112, 114, and 116 and a graphic editor 122 and a text editor 126 that allow a user to handle the object control program modules 112, 114, and 116. When the user generates a micro-robot control program for performing a new function by using the graphic editor 122 and the text editor 126, the micro-robot control program producing software 100 converts the
generated control program into an intermediate code format and transmits it to the micro robot 20 through the data transceiver 200.
More specifically, the micro-robot control program producing software 100 is composed of an object control program module provider 110, a control program editor 120, an intermediate code generator 130, and a downloader 140.
The object control program module provider 110 includes the command program modules 112, the event program modules 114, and the stack program modules 116, which are generally referred to as object control program modules hereinafter. An object control program module means a minimum code unit which performs a particular function that is induced by logical configuration in designing a program. The code unit can be reused by being inserted into other object-oriented programs and has the characteristic of data hiding. The characteristic of data hiding provides reliability, in which data collision is avoided even if an object program module is reused, and high system security.
As a generalized object class is defined, a plurality of objects can share a particular model, and a class defining an object can be reused in program code. The class defining an object includes a method or procedure and data variables, thereby enabling object-oriented programming.
Each of the command program modules 112 is an objectized set of a plurality of micro-robot operating commands which are performed according to a permutation's structure. Each command program module 112 is composed of a set of commands that instruct to perform at least one among the micro-robot operating controls such as a motor driving control, a speaker output (for example, output of beep sound or other sound) control, an LED output control, a counter setting control, and a timer setting control. For example, a user needs one or more command program modules 112 in order to drive a motor of the micro
robot 20.
Each of the event program modules 114 sets an event function, calls the event function when an event corresponding to that event function occurs, and performs the event function in a parallel structure. When among the events such as a switch button signal, a sensor signal, a counter signal, and a timer signal, at least one event is generated from the micro robot 20 to execute a micro-robot control program, an event program module corresponding to the generated event calls and performs the event function. Accordingly, each of the event program modules 114 needs to be linked to at least one command program module 112. Here, a plurality of events are simultaneously generated, the corresponding event program modules operate in parallel.
The cases where at least one event is generated can be classified as follows. In the first case, events are generated by sensors included in the micro robot 20. Here, the sensors include an infrared proximity sensor, a temperature sensor, and an illumination sensor. The infrared proximity sensor is a cylindrical high-frequency oscillation type. It is designed with application of principle of an eddy-current oscillation circuit and includes an amplifier and an LED. When the infrared proximity sensor senses an obstacle within a predetermined distance, when the temperatures sensor senses a temperature higher than a predetermined value, and when the illumination sensor senses light having brightness higher than a predetermined value, events are generated by the sensing signals of the respective sensors. When a particular event is generated, an event program module 114 corresponding to the event executes a command program module 112 that is linked to that event program module 114 so that the micro robot 20 follows light, traces a line, or turns on the LED when a temperature higher than the predetermined value is sensed.
In the second case, events are generated by switches included in the micro robot 20. The switches are user buttons for allowing a user to arbitrarily control the micro robot 20 to perform particular functions and include a reset button for resetting the functions of the micro robot 20 and a start button for instructing to start the micro robot 20. According to a method of linking a series of command program modules 112 to each event program module 114 related to a switch, the micro robot 20 can repeatedly perform various actions.
In the third case, an event is generated by a counter or timer included in the micro robot 20. Here, the micro robot 20 is programmed such that it performs a different action than an action that has been performed according to the combination of the above-described command program modules 112 if a predetermined period of time has lapsed or if the count reaches a predetermined number. For example, the micro robot 20 can be programmed such that if five minutes has lapsed since the micro robot 20 started to run, the micro robot 20 beeps three times, stops for a while, and resumes running. Here, each of the event program modules 1 14 needs to be linked to a relevant stack program module 116. The stack program modules 116 are objectized program statement structure which include a do statement, a do-while statement, a while statement, a loop statement, an if-then-else statement, and an if-end statement.
Each of the above-described object control program modules includes program code arrangement information. Accordingly, the graphic editor 122 and the text editor 126 of the control program editor 120 can arrange object control program modules according to programming grammar using the program code arrangement information included in each of the object control program modules. • The control program editor 120 includes the graphic editor 122,
the text editor 126, and a graphic/text converter 124 and may also include a class of other program elements (e.g., a window, a frame, a menu, a tool bar, and a state bar) and a library class for processing messages, keyboard input, and mouse input. The graphic editor 122 and the text editor 126 are provided with separate graphic user interfaces (not shown), respectively, or share a common graphic user interface (not shown). Accordingly, the graphic user interface for each of the graphic editor 122 and the text editor 126 provides a tool bar, in which the object control program modules are represented by icons, for a user and expresses one or more object control program modules that are selected by the user as graphic blocks or text codes so that the user can edit the control program.
It is preferable that each of the programs constituting the control program editor 120 is manifested as object linking and embedding (OLE) custom control (OCX). OCX is a special program which can be used in an application program that is executed on the Microsoft Windows. OLE is fundamental technology of the Microsoft with respect to a complex document. A complex document is visible and is like a background screen containing all kinds of information objects such as documents, calendars, moving pictures, sounds, cartoons, three-dimensional animations, continuously updated news, and controls. Each of the objects on the background screen, as a separate program entity, interacts with a user and communicates with other objects on the background screen. OCX may be referred to as an ActiveX control. OCX or ActiveX control is embodied in the form of a dynamic link library (DLL).
FIG. 4A shows a screen of a graphic user interface provided for a user by the graphic editor 122 according to the present invention.
Referring to FIG. 4A, a tool bar 409 having icons, by which object control program modules are represented, is positioned on the left of the
screen. A menu bar is positioned at the upper portion of the screen. The menu bar includes a File menu 401 for managing files, a View menu 403 for selecting graphic/text conversion, and a Run menu 405 for performing intermediate code generation. A graphic edition area 410, in which object control program modules are represented in the graphic, is positioned at the middle portion of the screen. A help information display area 407 is positioned between the menu bar and the graphic edition area 410. An icon 415 positioned on the lower right of the screen is a cancel icon for canceling the selection of a graphic block. If a user selects a graphic block by pressing a mouse button, drags the graphic block to the cancel icon 415, and releases the mouse button, the selected graphic block is thrown to a wastebasket.
An object control program module selected by a user is represented with the graphic block 413 by the graphic editor 122. Preferably, the graphic block 413 has a block shape with a salient or reentrant feature or salient and reentrant features indicating contact portions.
Object control program modules represented with graphic blocks 413 are combined according to program code arrangement information contained in the object control program modules. When a user intends to produce a block combination that is not appropriate to the programming grammar, the block combination is not accomplished according to the program code arrangement information. The graphic editor 122 can provide an input graphic block 411 for allowing the user to input selection information that is required by each object control program module represented with a graphic block 413. In other words, if the user selects and clicks a particular icon positioned within the tool bar 409 using a mouse, the input graphic block 411 is displayed. After the user designates a particular selection item within the input graphic block 411 or inputs selection information in an input box, the input
graphic block 411 may be converted into a usual graphic block.
The user can drag and combine the graphic block 413 with another graphic block using the mouse. Here, if code arrangement information does not match between the two graphic blocks to be combined, the graphic blocks stay in the graphic edition area without being fixed to each other.
FIG. 4B shows a screen on which the graphic editor 122 edits object control program modules on the graphic user interface according to the present invention. Referring to FIG. 4B, a plurality of graphic blocks 421 , 423, 425,
427, and 429 are combined in the graphic edition area 410 of the graphic user interface. A plurality of graphic blocks 423 are combined to the bottom of the graphic block 421 indicating a main program module. The graphic blocks 423 indicate command program modules, respectively. The block combination on the right of the graphic block 421 indicating the main program module is composed of the graphic block indicating an event program module and the graphic block 427 indicating a stack program module. The graphic block 425 shown in FIG. 4B indicates a switch event program module which is set such that only a switch No. 1 can generate an event. The graphic block 427 shown in FIG. 4B indicates a stack program module indicating a For statement. The graphic block 429 indicating command program modules are combined below the graphic blocks 425 and 427.
FIG. 4C shows a screen on which the text editor 126 edits object control program modules on the graphic user interface according to the present invention.
The text editor 126 expresses control program modules, which are selected from the object control program modules by the user, as text codes in a text edition area 440. In other words, when the user selects one or more object control program modules from the object control
program modules represented by icons on the tool bar of the graphic user interface, the text editor 126 expresses the selected one or more object control program modules as text codes in the text edition area 440 so that the user can edit the control program on the text base. The text editor 126 has a function that allows the user to select a style of text code to be displayed on the text edition area 440 from various styles of programming language such as basic language and C language. The command program modules 1 12, the event program modules 114, and the stack program modules 116, which are provided by the object control program module provider 110, have been objectized so that they can be compatible with existing programming language. Accordingly, as shown in FIG. 4C, object control program modules selected by the user are displayed in the form of basic language function in the text edition area 440. In addition, for text-based edition of the object control program modules displayed in the text edition area 440, the text editor 126 may provide application functions such as a function of arranging a code stream, a function of marking and detecting a code stream (for example, a bookmark function), and a function of debugging an erroneously written code (for example, a function of when the user erroneously writes a code function like "MOTORRUN (x)n instead of "RUNMOTOR(x)" in the text edition area 440, detecting the code function from the object control program modules of the object control program module provider 110 and automatically correcting it). FIG. 5A shows an icon bar for the command program modules
112 that are provided to the graphic user interface by the object control program module provider 110 according to the present invention.
Table 1 shows the function names and functions of the command program modules 112 corresponding to icons on the icon bar shown in FIG. 5A.
Table 1
FIG. 5B shows an input graphic block that is provided when a user selects and clicks an icon, which is positioned within a tool bar, for driving a motor using a mouse.
The input graphic block for driving the motor includes buttons 520 and 521 for selecting driving or non-driving of motors rotating both wheels, respectively, an input box 522 for inputting a driving period of time, a button 523 for selecting whether to converting the input graphic block into a graphic block for combination after selection information is completely input, an a cancel button 524 for canceling the input graphic
block.
FIG. 6A shows an icon bar for the event program modules 114 that are provided to the graphic user interface by the object control program module provider 110 according to the present invention.
Table 2 shows the function names and functions of the event program modules 114 corresponding to icons on the icon bar shown in FIG. 6A.
Table 2
FIG. 6B shows a graphic block that is provided in the graphic edition area 410 when an icon of the OnNear event program module shown in FIG. 6A is clicked.
FIG. 7A shows an icon bar for the stack program modules 116 that are provided to the graphic user interface by the object control program module provider 110 according to the present invention. FIG.
7B shows a graphic block that is provided in the graphic edition area 410 when an icon of a DoLoop-statement stack program module shown in FIG. 7A is clicked.
Referring to FIG. 7B, the graphic block displaying a DoLoop-statement stack program module includes icons 701 which can be clicked using a mouse and are linked to event program modules except the main program module.
The graphic/text converter 124 performs graphic processing to convert a micro-robot control program, which is generated through the graphic editor 122, into a text format and performs text processing to convert a micro-robot control program, which is generated through the text editor 126, into a graphic format.
The graphic user interface of the control program editor 120 provides a mouse interface so that when a user puts the cursor of a mouse in an area in which an object control program module is expressed while editing the command program modules 112, the event program modules 114, and the stack program modules 116, each of which is expressed as a text code or a graphic block, help information about the object control program module can be provided. The intermediate code generator 130 compiles the micro-robot control program that has been edited through the control program editor 120 and generates an intermediate code, which can be identified as a micro-robot control program module by the micro robot.
The downloader 140 downloads the compiled micro-robot control program or the intermediate code for the control program, which is generated from the intermediate code generator 130, to the micro robot 20. In order to allow the downloader 140 to download the micro-robot control program to the micro robot 20, the micro-robot control program producing apparatus 10 and the micro robot 20 need to have the data transceiver 200. A serial port and a universal asynchronous receiver
and transmitter (UART) or an infrared data association (IrDA) may be used for the data transceiver 200.
FIG. 8 shows a data stream that is defined by an intermediate code transmission protocol, which the micro-robot control program producing apparatus 10 according to the present invention uses to transmit a micro-robot control program in an intermediate code format to the micro robot 20.
Referring to FIG. 8, each of the object codes of a transmission data stream has a structure of "(event code, parameter code, n(command code, parameter code))". Here, "n" indicates the number of command codes linked to the event code. An event code has three bytes, a parameter code has four bytes, and a command code has one byte. When a stack control code is included in an object code, the object code has a variable structure. In other words, on receiving a stack control code, the micro robot 20 checks insertion or non-insertion of an event code. If an event code has been inserted, the micro robot 20 receives an event code and a parameter code and then receives command codes included in a stack until an end code, for example, OxFF, is received. The initial command code and the initial parameter code are continuously transmitted to the micro robot 20 until a new event code appears. When receiving an end code 800, for example, OxFF 0x00 0x00, the micro robot 20 ends the reception of the transmission data stream.
FIG. 9 is a block diagram of the internal structure of the micro robot 20, which operates according to a micro-robot control program that is produced according to the present invention. Referring to FIG. 9, the micro robot 20 includes a processor 905, a memory unit 910, a receiver 915, a control program restoration unit 920, a sensor unit 925, a switch unit 930, a driver 935, a speaker unit 940, an LED unit 945, a power supply 950, and a pen holder 955. In addition, the micro robot 20 may
include a plurality of motors, a wheel, a driving chip, a high-speed diode, and a connector.
The power supply 950 includes a battery and a converter.
The sensor unit 925 includes a pair of infrared proximity sensors 925a for respectively receiving and emitting light, an illumination sensor 925c, and a temperature sensor 925b. The sensor unit 925 may also include additional elements such as a decoder, a power amplification chip, and an operational amplifier.
The infrared proximity sensor 925a is a sensor for sensing obstacles. When running, the micro robot 20 can avoid obstacles using signals generated by adjusting the infrared proximity sensor 925a to face the front or move as a line tracer tracking a black line by adjusting the infrared proximity sensor 925a to face the ground.
The illumination sensor 925c has a function of sensing illumination from several tens of luxes to several thousands of luxes step by step. When the illumination sensor 925c of the micro robot 20 senses light within a predetermined illumination range and generates an event, the micro robot 20 operates according to a command program module linked to an event program module corresponding to the event. Usually, a non-contact infrared pyrometer is used as the temperature sensor 925b. An infrared pyrometer senses infrared rays emitted from an object and thus detects the surface temperature of the object without directly contacting the object. Accordingly, the temperature sensor 925b of the micro robot 20 may be used to measure temperature within a predetermined range indicating an area, to which access is impossible, in non-contact mode or monitor abnormal heating. For example, the micro robot 20 may be programmed to generate beep sound through the speaker unit 940 when an event is generated by abnormal temperature. The receiver 915 corresponds to the data transceiver 200 of the
micro-robot control program producing apparatus 10. A serial port and a UART or IRDA are used for the receiver 915 that receives a micro-robot control program code.
The micro-robot control program code that is downloaded from the data transceiver 200 of the micro-robot control program producing apparatus 10 to the receiver 915 of the micro robot 20 may have an intermediate code format. The micro robot 20 needs the control program restoration unit 920 to convert an intermediate code of a micro-robot control program into the micro-robot control program having a digital data format which can be executed in the micro robot 20.
The memory unit 910 stores the micro-robot control program restored by the control program restoration unit 920 or the compiled micro-robot control program code received through the receiver 915 and temporary data generated during the arithmetic operation of the processor 905. It is preferable to use memory having a sleep function or non-volatile random access memory (NVRAM) for the memory unit 910 so that operation data can be stored even if power is cut off. NVRAM can be manifested as static random access memory (SRAM) or electrically erasable programmable read-only memory (EEPROM) having a backup battery. In case of the micro-robot control program restored by the control program restoration unit 920, the intermediate codes of the object control program modules provided from the object control program module provider 110 are combined with corresponding object control program modules that have been stored in the memory unit 910 in the form of firmware, thereby forming an entire micro-robot control program code.
The processor 905 performs arithmetic operations on the micro-robot control program code stored in the memory unit 910 to control the action of the micro robot 20. The processor 905 performs arithmetic operations one or more event program modules, which have
been edited through the control program editor 120 and then have been received through the receiver 915 and recognizes events according to the sensing signals of the illumination sensor 925c, the temperature sensor 925b and the infrared proximity sensor 925a, a timer signal, a counter signal, and a switch signal so that the micro robot 20 acts according to the results of arithmetic operations and recognition. Here, the micro robot 20 performs various actions according to the functions of command program modules linked to each event program module.
The switch unit 930 makes the processor 905 calling a micro-robot control program that controls a particular action of the micro robot 20. For example, if a user presses a start button of the switch unit 930, after being in a standby state for a predetermined period of time for setting, the micro robot 20 executes a control program corresponding to the start button and acts according to the control program. The function of the start button can be performed through a switch event program module and a wait command program.
The speaker unit 940 outputs a predetermined beep sound or other sounds according to a control signal of the processor 905. The speaker unit 940 may include a plurality of speakers. The LED unit 945 includes one or more LEDs and LED driving chips that operate according to a control signal of the processor 905.
The pen holder 955 installed in the micro robot 20 includes a supporter, which is connected to the driver 935 such as a solenoid so that it can be moved up and down and to which a pen can be installed. Accordingly, a user can make the micro robot 20 drawing a feature or writing a letter by installing a pen at the supporter and downloading a command program module for controlling the driver 935 to move the supporter up and down and a command program module related with running to the micro robot 20. The following description concerns a method for producing a
micro-robot control program and a method for operating a micro robot according to the control program.
FIG. 10 is a flowchart of a method for producing a micro-robot control program according to the present invention. In response to a user's selection, the control program editor 120 provides the user with the graphic user interface of either the graphic editor 122 or the text editor 126 in steps S110 through S120.
The user selects and edits object control program modules from the command program modules 112, the event program modules 114, and the command program modules 116, which are provided from the object control program module provider 1 10 in response to an edition command from the graphic editor 122 or the text editor 126, thereby producing a micro-robot control program in step S125. Here, the graphic user interface provided by the graphic editor 122 or the text editor 126 can provide the user with a function of providing help information about edition, an error display function, and a debugging function, etc.
Next, the edited micro-robot control program is compiled by the intermediate code generator 130 in step S130. An intermediated code of the micro-robot control program is generated in step S140.
If an error occurs during compiling in step S135, the control program is re-edited through the control program editor 120. Here, it is preferable for the user to use the text editor 126 that has a wider application range than the graphic editor 122. Thereafter, the downloader 140 is synchronized with the micro robot 20 in step S145 and transmits the intermediate code or the compiled micro-robot control program to the micro robot 20 in step S150.
Here, if a transmission error occurs in step S155, the downloader 140 retransmits the control program after synchronization with the micro robot 20.
FIG. 1 1 is a flowchart of a method for operating a micro robot according to the micro-robot control program produced by the method shown in FIG. 10.
The micro robot 20 is synchronized with the downloader 140 and requests the downloader 140 to transmit a micro-robot control program in step S220. Here, in a case where a transmission error occurs in step
S230, the micro robot 20 can receive the micro-robot control program again.
If a user turns on a start switch (or a control program execution switch), that is, if there is a request to execute a control program from the user in step S240, the micro robot 20 executes the micro-robot control program, which is newly received or stored in the memory unit 910, in step S250. If an event is generated during the execution of the micro-robot control program in step S260, the processor 305 processes the mathematical function of the event in step S270 and continues the execution of the micro-robot control program.
If there is a request to end the micro-robot control program from the user (for example, if an end switch is turned on) in step S280 or if the micro-robot control program has been automatically ended without having an event any more in step S290, the micro robot 20 ends the micro-robot control program and is initialized. With such a method as described above, the user can directly check the programming result so that he/she can embody the functions of the micro robot 20 in various ways and progress programming study on a control program. A method for producing a micro-robot control program according to the present invention can be manifested as a program which can be executed on a computer. In addition, the method can be realized on a universal digital computer using computer-readable media. The computer-readable media include storage media such as magnetic storage media (for example, ROM, floppy discs, and hard discs), optical
media (for example, CD-ROMs and DVDs), and carrier waves (for example, transferred through the Internet).
The above description just concerns embodiments of the present invention. The present invention is not restricted to the above embodiments, and it will be understood by those skilled in the art that various modifications can be made thereto within the scope of the invention. For example, each member specified in the embodiments can be changed. In addition, it will be construed that all differences made by changes and modifications are included within the scope the present invention defined by the appended claims.
Industrial Applicability
According to the present invention, even if a user does not have knowledge about electronics, he/she can easily produce a micro-robot control program using a graphic user interface provided from a micro-robot control program editor and study a text-based control program by converting the micro-robot control program produced through a graphic editor into programming language displayed by a text editor and comparing it with the converted programming language. In addition, by downloading the produced micro-robot control program to a micro robot and operating the micro robot, the user can immediately check the functions of the micro-robot control program. Moreover, the user can uses the micro robot as an educational apparatus by installing accessory members to the micro robot and operating the micro robot to perform various actions.