Index of Robot
The "Multiple Robots" mode of the Entry is available since the Robot Coding Software version 1.5.3,
not supported by the Entry Hardware Connection program.
The Hamster robot is numbered from 0, 1, 2, 3, 4, 5, ... in order from the first connected to the PC.
If the order of the hardware robots is important, turn on the robots one by one.
When the first robot is turned on, it will be robot #0.
After confirming that the first robot is connected, turn on the second robot, and when it is connected, it becomes robot #1.
This way, you can set the order of hardware robots by turning them on one by one.
If you do not need to distinguish hardware robots, you can turn on the robots at once.
In this case, you do not know which one will be connected first, but they are numbered in order from the first connected to the PC.
This number is the index distinguishing the robots.
If you enter the index of the robot in each block, the command is sent to the robot.
The index of the robot can be also found in the list of robots on the right side of the Robot Coding Software.
If there is a hand or object in front of the left or right proximity sensor, it is judged as 'True', otherwise 'False'.
If the hand or object is too close (within 1cm), it will not be detected.
Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
The sensor value of a Hamster robot
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left proximity: The value of the left proximity sensor (0 to 255). Default: 0
- right proximity: The value of the right proximity sensor (0 to 255). Default: 0
The closer the object is, the greater the value of the left/right proximity sensor.
It detects obstacles at distances of 1 cm or more and 30 cm or less in front.
- left floor: The value of the left floor sensor (0 to 100). Default: 0
- right floor: The value of the right floor sensor (0 to 100). Default: 0
The range of output values of the left/right floor sensor is 0 to 255,
but since the brightest color (the brightest color among nearest white) is automatically adjusted to 100,
the range of sensor values used when writing codes is 0 to 100.
- acceleration x: The x-axis value of the acceleration sensor (-32768 to 32767). Default: 0
- acceleration y: The y-axis value of the acceleration sensor (-32768 to 32767). Default: 0
- acceleration z: The z-axis value of the acceleration sensor (-32768 to 32767). Default: 0
The acceleration sensor coordinate system of the Hamster robot is that the direction which the robot moves forward is the positive direction of the X-axis, the left direction of the robot is the positive direction of the Y-axis, and the upward direction is the positive direction of the Z-axis.
- light: The value of the light sensor (0 to 65535). Default: 0. The brighter, the greater the value.
- temperature: The temperature value inside the hamster robot (-40 to 88 degrees Celsius). Default: 0
- signal strength: The signal strength of Bluetooth wireless communication (-128 to 0 dBm). Default: 0.
As the signal strength increases, the value increases.
- input A: The value of the signal input from the external extension port A (analog input 0 to 255, digital input 0 or 1). Default: 0
- input B: The value of the signal input from the external extension port B (analog input 0 to 255, digital input 0 or 1). Default: 0
Moves one space forward on the board composed of black grids.
The board can be downloaded from the
Tutorial - Classroom Materials - Worksheet.
Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Turn left/right 90 degrees in place on the board composed of black grids.
The board can be downloaded from the
Tutorial - Classroom Materials - Worksheet.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Turn left 90 degrees in place.
- right: Turn right 90 degrees in place.
Move forward for the number of seconds entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- Time to move (seconds, positive value)
Move backward for the number of seconds entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- Time to move (seconds, positive value)
Turn left/right in place for the number of seconds entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Turn left.
- right: Turn right.
Third Parameter
- Time to turn (seconds, positive value)
Add the values you entered to the current speed (%) of the left wheel and the right wheel respectively.
If the result is positive, the wheel rotates forward; if negative, the wheel rotates backward.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The value to add to the current speed (%) of the left wheel
Third Parameter
- The value to add to the current speed (%) of the right wheel
Set the speed of the left wheel and the right wheel to the entered value (-100 to 100%), respectively.
If you enter a positive value, the wheel rotates forward.
If you enter a negative value, the wheel rotates backward.
Entering the number 0 stops it.
The value you entered is the % value based on the maximum speed.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The speed of the left wheel (-100 to 100%)
Third Parameter
- The speed of the right wheel (-100 to 100%)
Add the value you entered to the current speed (%) of the left/right/both wheels.
If the result is positive, the wheel rotates forward; if negative, the wheel rotates backward.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Add the value you entered to the current speed (%) of the left wheel.
- right: Add the value you entered to the current speed (%) of the right wheel.
- both: Add the value you entered to the current speed (%) of each of the left wheel and right wheel.
Third Parameter
- The value to add to the current speed (%) of the selected wheel
Set the speed of the left/right/both wheels to the entered value (-100 to 100%).
If you enter a positive value, the wheel rotates forward.
If you enter a negative value, the wheel rotates backward.
Entering the number 0 stops it.
The value you entered is the % value based on the maximum speed.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Set the speed of the left wheel to the value you entered.
- right: Set the speed of the right wheel to the value you entered.
- both: Set the speed of both wheels to the value you entered.
Third Parameter
- The speed of the selected wheel (-100 to 100%)
Move along the black/white line by using the left/right/both floor sensors.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- black: Move along the black line on a white background.
- white: Move along the white line on a black background.
Third Parameter
- left: Move along the line by using the left floor sensor.
- right: Move along the line by using the right floor sensor.
- both: Move along the line by using the both floor sensors.
Move along the black/white line on the left/right/front/rear,
then stops when it encounters the intersection.
When you first start, it is best to choose the 'front' or 'rear' intersection for the second parameter.
The robot may not turn left or right if the first starting position is not exactly on the intersection.
If the robot encounters an intersection while moving, it will stop at the correct location,
so you can choose anything for the second parameter from hereafter.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- black: Move along the black line on a white background.
- white: Move along the white line on a black background.
Third Parameter
- left: After turning to the left, move along the line and stop when the robot encounters an intersection.
- right: After turning to the right, move along the line and stop when the robot encounters an intersection.
- front: Move forward along the line and stop when the robot encounters an intersection.
- rear: After turning 180 degrees, move along the line and stop when it encounters an intersection.
Set the speed (1 to 8) to move along the line.
The greater the number, the faster the movement.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The speed to move along the line (1 to 8)
Stop both wheels.
Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Turn on the left/right/both LEDs to the selected color.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Turn on the left LED.
- right: Turn on the right LED.
- both: Turn on the both LEDs.
Third Parameter
- LED color (red, yellow, green, sky blue, blue, purple, white)
Turn off the left/right/both LEDs.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- left: Turn off the left LED.
- right: Turn off the right LED.
- both: Turn off the both LEDs.
The buzzer sound of 440 Hz sounds short (0.2 seconds).
Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Add the value you entered to the current pitch (Hz) of the buzzer sound.
You can enter up to two decimal places.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The value to add to the current pitch (Hz) of the buzzer sound
Set the pitch of the buzzer sound to the value (Hz) you entered.
You can enter up to two decimal places.
Entering the number 0 turns off the buzzer sound.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The pitch of the buzzer sound (0 to 167772.15 Hz)
Turn off buzzer sound.
Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
It sounds the note of the selected pitch and octave as much as the beat you entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- Pitch (C, C#, D, Eb, E, F, F#, G, G#, A, Bb, B)
Third Parameter
Fourth Parameter
Rest as much as the beat you entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
Add the value you entered to the current BPM (beats per minute) of playing or rest.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The value to add to the current BPM (beats per minute)
Set the speed of playing or rest to the BPM (beats per minute) you entered.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- The speed of playing or rest (BPM, beats per minute)
Set the input/output mode of the external extension port.
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- A: Set the input/output mode of port A among the external extension ports.
- B: Set the input/output mode of port B among the external extension ports.
- A and B: Set the input/output mode of both port A and port B.
Third Parameter
- analog input: Set the input/output mode to the analog input.
- digital input: Set the input/output mode to the digital input.
- servo output: Set the input/output mode to the analog servo output.
- pwm output: Set the input/output mode to the PWM output.
- digital output: Set the input/output mode to the digital output.
Add the value you entered to the current output value of the external extension port.
The result will have the following range depending on the mode of the external extension port.
- servo output: Valid values are 1 to 180 degrees. If 0, the output is always 0 without PWM pulse.
- pwm output: 0 to 255. Set the duty ratio of ON state in PWM waveform to 0 to 255 steps.
- digital output: LOW if 0, otherwise HIGH
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- A: Add the value you entered to the current output value of port A among the external extension ports.
- B: Add the value you entered to the current output value of port B among the external extension ports.
- A and B: Add the value you entered to the current output value of each of port A and port B.
Third Parameter
- The value to add to the current output value of external extension port
Set the output value of the external extension port to the value you entered.
The input value has the following range depending on the mode of the external extension port.
- servo output: Valid values are 1 to 180 degrees. If 0, the output is always 0 without PWM pulse.
- pwm output: 0 to 255. Set the duty ratio of ON state in PWM waveform to 0 to 255 steps.
- digital output: LOW if 0, otherwise HIGH
First Parameter
- The robot's index starting from 0 to distinguish each other (number of 0 or more). Default: 0
Second Parameter
- A: Set the output value of port A among the external extension ports to the value you entered.
- B: Set the output value of port B among the external extension ports to the value you entered.
- A and B: Set the output values of both port A and port B to the value you entered.
Third Parameter
- The output value of the external extension port
Contents
Copyright Robot Software Education Institute. All rights reserved.
Please contact prof. Kwang-Hyun Park (
akaii@kw.ac.kr) if you have any problem.