# ICRobot Block Guide ## Motion ### Robot (moves forward、moves backward、turns left、turns light) at ( ) % power ![](IMG/B1.png) Controls the robot to move in the specified direction with the given power. Example: ![](IMG/B2.png) ### Robot (moves forward、moves backward、turns left、turns light) at ( ) % power ( ) Seconds ![](IMG/B3.png) Controls the robot to move in the specified direction with a given power for a certain number of seconds. This is a blocking block. Example: ![](IMG/B4.png) ### Robot (moves forward、moves backward、turns left、turns light) at ( ) % power for ( ) cm ![](IMG/B5.png) Controls the robot to move in the specified direction with a given power for a specified distance. This is a blocking block. Example: ![](IMG/B6.png) ### Robot (turns left、turns light) at ( ) % power for () degrees until done ![](IMG/B7.png) Controls the robot to turn left or right with the specified power until the target angle is reached. This is a blocking block. Example: ![](IMG/B8.png) ### Robot's left wheel rotates at ( ) % power, right wheel rotates at ( ) % power ![](IMG/B9.png) Independently control the power of the left and right wheels. Example: ![](IMG/B10.png) ### Robot's motor (left wheel / right wheel) with ( )% power for ( ) (Seconds / cm) ![](IMG/B11.png) Controls a single wheel to move with the specified power for a given time or distance. Example: ![](IMG/B12.png) ### Robot's motor (left wheel / right wheel) rotates at ( ) % power indefinitely ![](IMG/B13.png) Continuously control a single wheel to move with the specified power. Example: ![](IMG/B14.png) ### Stop Movement ![](IMG/B15.png) Stop the robot's motion. ## Display (Matrix LED) ### Set display brightness to (1–10) ![](IMG/B16.png) Set the display brightness of the robot's dot-matrix screen, the value is 1-10, the larger the value the brighter it is. Example: ![](IMG/B17.png) ### (Static / Right to Left / Left to Right / Top to Bottom / Bottom to Top) Display () for () seconds ![](IMG/B18.png) Setting the static or dynamic display of the set dots for a given length of time Example: ![](IMG/B19.png) ### (Static / Right to Left / Left to Right / Top to Bottom / Bottom to Top) Display ( ) ![](IMG/B20.png) Set static or dynamic display of a given dot matrix all the time Example: ![](IMG/B21.png) ### Display Text () ![](IMG/B22.png) Display a text string on the matrix; if the string exceeds the matrix width, it scrolls; otherwise, it displays statically. Example: ![](IMG/B23.png) ### Light up x() y() ![](IMG/B24.png) Turn on the LED at coordinate (x, y); (0, 0) is bottom-left. Example: ![](IMG/B25.png) ### Only light up x() y() ![](IMG/B26.png) Light up only the LED at (x, y), turning off all others. Example: ![](IMG/B27.png) ### Turn off x() y() ![](IMG/B28.png) Turn off the LED at coordinate (x, y). Example: ![](IMG/B29.png) ### Toggle x() y() ![](IMG/B30.png) Switch the LED at (x, y) between on and off. Example: ![](IMG/B31.png) ### Set tail light color() ![](IMG/B32.png) Change the tail light to a selected color. Example: ![](IMG/B33.png) ### Set tail light color to R() G() B() ![](IMG/B34.png) Set RGB values for the tail light. Example: ![](IMG/B35.png) ### Turn off display ![](IMG/B36.png) Turn off the matrix display. Example: ![](IMG/B37.png) ## Audio ### Upload Audio File ![](IMG/B38.png) Choose and upload a custom audio file, and assign a filename. ![](IMG/B39.png) ### Set volume to () ![](IMG/B40.png) Set playback volume (range: 0–10). ### Play music () until finished ![](IMG/B41.png) Play selected audio file; wait until it finishes before continuing the next action. Example: ![](IMG/B42.png) ### Play music () ![](IMG/B43.png) Play the selected audio file immediately. Example: ![](IMG/B44.png) ### Stop playback ![](IMG/B45.png) Stop the current audio. ### () Play local audio () ![](IMG/B46.png) Play an uploaded audio file in real-time. Example: ![](IMG/B47.png) ## Actuators ### Robot's gripper at port ( ) (open/close) ![](IMG/B48.png) ontrol the gripper at the selected port. Example: ![](IMG/B49.png) ### Robot's gripper at port ( ) (open/close) until done ![](IMG/B50.png) Control the gripper and wait until action completes before next step. Example: ![](IMG/B51.png) ### Robot's launcher at port ( ) shoots (number) ball ![](IMG/B52.png) Launch specified number of marbles from selected port. Example: ![](IMG/B53.png) ### Robot's launcher at port ( ) shoots ( ) ball until done ![](IMG/B54) Launch and wait until finished before proceeding. Example: ![](IMG/B55.png) ## Sensors ### Button (A/B) pressed ![](IMG/B56.png) Detect if left or right button is pressed. Example: ![](IMG/B57.png) ### Sound()() ![](IMG/B58.png) Check if detected sound is greater/less than/equal to a value. Example: ![](IMG/B59.png) ### Current sound level ![](IMG/B60.png) Return the detected sound level. Example: ![](IMG/B61.png) ### Current battery level ![](IMG/B62.png) Return remaining battery. Example: ![](IMG/B63.png) ### ()current speed ![](IMG/B64.png) Get current speed of each wheel. Example: ![](IMG/B65.png) ### Privacy switch status ![](IMG/B66.png) Return status of privacy switch. Example: ![](IMG/B67.png) ### ()movement distance ![](IMG/B68.png) Return the movement distance. Example: ![](IMG/B69.png) ### Set line-following sensor to () mode ![](IMG/B70.png) Choose binary/gray/color mode. Example: ![](IMG/B71.png) ### Run Line Following Sensor Binary Learning ![](IMG/B72.png) Set Line Following Sensor to binary mode learning. Example: ![](IMG/B73.png) ### Run Line Following Sensor Learning () Colour ![](IMG/B74.png) Learn a specific color. Example: ![](IMG/B75.png) ### Value detected by the roving sensor probe ( ) ![](IMG/B76.png) Get value from probe (L1, L2, M, R2, R1). Example: ![](IMG/B77.png) ### Line Following probe () detects () ![](IMG/B78.png) Check if probe detects specific color. Example: ![](IMG/B79.png) ### Line Following probe () value () () ![](IMG/B80.png) Whether the detected value is greater than/less than/equal to the specified value Example: ![](IMG/B81.png) ### Turn off Line Following sensor ![](IMG/B82.png) Disable Turn off Line Following sensor. Example: ![](IMG/B83.png) ### Start auto line following at () speed ![](IMG/B84.png) Allow robots to automatically patrol lines at low/medium/high speeds Example: ![](IMG/B85.png) ### Start auto line following at () speed until state is () ![](IMG/B86.png) Controls the robot to start auto-touring at low/medium/high speeds until the value of the five probes is the set value and then stops auto-touring. Example: ![](IMG/B87.png) ### Stop auto line following ![](IMG/B88.png) Stop line-following behavior. Example: ![](IMG/B89.png) ## External Microbit Module ### Port () Servo rotates to () degrees ![](IMG/B90.png) Set servo rotation degree ### **Port ()** Set the servo motor to **()** ![](IMG/B91.png) Set servo motor mode ### **Port ()** Servo motor rotates at a speed of **()** ![](IMG/B92.png) Set motor rotation speed ### **Port ()** Servo motor rotates at a speed of **() for () seconds** ![](IMG/B93.png) Set motor rotation speed and time ### Port () Servo motor rotates at speed **()** to **()** degrees ![](IMG/B94.png) Set motor rotation speed and rotate to a fixed angle ### Port () servor motor rotates at speed () for () degrees ![](IMG/B95.png) Set motor rotation speed and angle ### Port () servor motor stop ![](IMG/B96.png) Set motor to stop rotation ### Port () Get current angle ![](IMG/B97.png) Get current angle ### **Port ()** Laser sensor set to **() **brightness **()** ![](IMG/B98.png) Set laser sensor brightness and switch state ### Port () fan runs at a speed of () () ![](IMG/B99.png) Set fan speed and switch state ### Port()()(sensor) ![](IMG/B100.png) Set sensor switch state ### **Port ()** Detects joystick **()** ![](IMG/B101.png) Judge joystick state ### Port () Joystick () direction ![](IMG/B102.png) Get joystick X or Y direction value ### Port () Ultrasonic sensor distance ![](IMG/B103.png) Get ultrasonic sensor distance value ### **Port ()** Potentiometer ![](IMG/B104.png) Get potentiometer sensor value ### Port () Hall sensor ![](IMG/B105.png) Get Hall sensor value ### Port () PIR sensor ![](IMG/B106.png) Get human infrared sensor value