Function Details Sound functions and sets of commands for creating sound to drive out speakers. void beep (); Create bubbling void sound (int freq, int t); Generate sound with frequency, sound, freq, and time in milliseconds. void keylow (char k, int t); Make low notes and t seconds. void keymid (char k, int t); Mute the midpoint of different notes and time t milliseconds. void keyheigh (char k, int t); Create high notes, tones and t seconds. Application Form keylow ('d', 500); // Low sound for 500 milliseconds 'd' = 's' = salute 'r' = 'l' = goodbye 'm' = 't' = t 'f' = ph System functions and command sets for delaying and stopping the robot system. void sleep (int t); Delay t milliseconds void system_stop (); Stop the whole robot. Servo functions and command sets for servo motors void servo (int i, int j); * not active motor functions and command sets for driving a DC motor or controlling a wheel of a simulated robot. void motor (int i, int power); Drive the i-channel motor with power power i = 1 motor left 2 right motor power has a value - retreat, there is a value + forward void ao (); Stop driving all channels. void motor_stop (int a); Stop the motor drive at a Like motor_stop (1); Stop motor left motor_stop (2); Stop the motor on the right motor_stop (0); Stop the motor on both sides motor_stop (ALL); Stop the motor on both sides void robot_go (byte p, int t); Driven simulation robot with p power and time t millis. void fd (int p); Drive motor or robot forward with power p void bk (int p); Motor drive or robot reverse with power p void tl (int p); Motor drive or left-handed left-handed robot with power p void tr (int p); Drive the motor or the right turn right wheel with the power p. void sl (int p); Drive a motor or rotate left-handed robot with p power. void sr (int p); Drive the motor or rotate the right robot with the power p void fd2 (int a, int b); Drive a motor with a power, b (a is left, b is the right) void bk2 (int a, int b); Drive a motor backward with a power, b (a is left, b is the right) Input analog function and instruction set for read from analog inputs connected to the detector device and switch. int analog (int ch); Read values ​​from the analog input connected to the channel detector device. Ch value from 0 to 7 is a sensor for reading the ground. Ch value of 8 is a sensor to read the color of the object was dumped in the front. int sw1 (); Read the value of pressing the sw1 key. Restore 1 when the switch is pressed, restore 0 when no switch is pressed. int sw2 (); Read the value of pressing sw2. Restore 1 when the switch is pressed, restore 0 when no switch is pressed. int sw3 (); Read the value of pressing the sw3 key. Restore 1 when the switch is pressed, restore 0 when no switch is pressed. void sw1_press (); It is a loop function until a button is pressed or wait until the sw1 button is pressed. void sw2_press (); It is a loop function until a button is pressed or wait until the sw2 button is pressed. void sw3_press (); It is a loop function until a button is pressed or wait until the sw3 button is pressed. lcd function and instruction set to generate numeric text on the LCD screen void lcd (string str, arg [] list); Application Form lcd ("Hello robot"); // Hello robot appears on the LCD screen. lcd ("Value =% d", i); // Display Value = (value of variable i) on the LCD screen lcd ("Value1 =% d Value2 =% d", i, j); // Display message Value1 = (value of variable i) Value2 = (value of variable j) % d or% D shows integer numbers. % f or% F indicates the number of decimal places. % .2f or% .2F shows numeric values ​​with two decimal places.