
Development of Mobile Robot Based on I
2
C Bus System
207
Input Velocity. During connection with robot, the PC can send command to the robot and
receives sensor information from robot by using I
2
C bus system. The START button is used
to establish the connection with real robot using wireless serial connection. The STOP
button is used to disconnect the robot from the PC. It terminates the communication
between robot and PC. The desired velocity can be defined in mm sec
-1
for forward and
backward movement in this Input Velocity block.
In this program, the robot velocity are
limited up to maximum 500 mm sec
-1
for safety reason. Left and right turning is done by
heading setting, which has already defined in the program. This is the important one to
navigate the robot in the environment. As shown in Fig. 25 there are total five buttons to
control the robot, which are Forward, Backward, Turn Left, Turn Right and Stop. After
establishing connection with the robot through wireless communication and entering all
velocity values, the robot will be ready to move in the desired directions.
By pressing F
button robot starts to run forward with the given velocity. To stop the robot in forward
moving, the S button must be pressed. The B button for backward moving works as same
as the F button. The L and R button are used to turn the robot in left and right direction
respectively. After the L or R button are pressed, the S button can use to stop the robot in
desired position.
The operation is same like for left button.
Fig. 25. Manual control window for AMRO
As above mentioned, the S button is very useful to stop the robot motion. In any condition
of the robot, this button plays an important role to restrict the further motion of the robot
without disconnecting from PC too. The software is designed to control data between the
robot and sensor device, which is programmed based on Visual C
++
. The software must be
able to control SCL and SDA line. To control data line on the I
2
C bus, the step ordering of
function based on Visual C
++
must be carefully accurately considered and programmed,
because if one step miss or does not complete, all devices on this bus will fail. The main
function used for programming will be now detailed. All conditions are only generated by
robot (as master device). The two main functions are I2C_START ( ) and I2C_STOP ( ). The
I2C_START ( ) function produces the START condition as shown in Fig.26.
www.intechopen.com
Comentários a estes Manuais