Step 4: SOFTWARE DESCRIPTION AND WORKING
will run forever by using ‘while’ loop. Under ‘while’ loop, read port A and test the received input using ‘switch’ statement. The corresponding data will output at port D after testing of the received data.
In order to control the robot, you need to make a call to the cell phone attached to the robot (through head phone) from any phone, which sends DTMF tunes on pressing the numeric buttons. The cell phone in the robot is kept in ‘auto answer’ mode. (If the mobile does not have the auto answering facility, receive the call by ‘OK’ key on the rover-connected mobile and then made it in hands-free mode.) So after a ring, the cellphone accepts the call. Now you may press any button on your mobile to perform actions as listed in Table III. The DTMF tones thus produced are received by the cellphone in the robot. These tones are fed to the circuit by the headset of the
cellphone. The MT8870 decodes the received tone and sends the equivalent binary number to the microcontroller. According to the program in the microcontroller, the robot starts moving.When you press key ‘2’ (binary equivalent 00000010) on your mobile phone, the microcontroller outputs ‘10001001’ binary equivalent. Port pins PD0, PD3 and PD7 are high. The high output at PD7 of the microcontroller drives the motor driver (L293D). Port pins PD0 and PD3 drive motors M1 and M2 in forward direction (as per Table III). Similarly, motors M1 and M2 move for left turn, right turn, backward motion and stop condition as per Table III.