Tuesday, April 14, 2009

Ch.4: Reading Sensors

From the reading of Chapter 4: Reading sensors,
I studies various types of sensors.

There are mainly four types of sensors, light, sound, touch, and ultrasonic.
Each sensor has a specific way to use, and all sensors are valuable in different situation.

Light sensor might be useful, when the user wants the robot to sense the light of dark and light, and do certain action depends on the light the sensor sensed.

Sound sensor might be useful, when the user wants the robot to do specific action, when the sound is played, or stopped. The user will be able to control the start and stop of the robot from far away, by just making the sound.

Touch sensor might be useful, when the user wants the robot to do specific action, when the touch sensor is being pressed. For example, make the robot to change the direction, when the robot crushes to something.

Ultrasonic sensor might be useful, when the user wants the robot to do specific action, when the sensor senses some kind of object in front of the robot. This sensor will allow the robot to change the direction without crushing to something.

For using the light sensor, I need to take care of threshold. Threshold will divide the difference of light into two parts, light and dark. This will be very important, as it allows the robot to do two types of different action, when the light sensor senses dark and light.

By using light sensor, and the appropriate program, the robot is able to follow the line. In order to do this, there are steps the user must follow to make its robot to track the lines. Firstly, the user needs to set the threshold for robot, in order for robot to be able to sense dark and light. Secondly, the user needs to make a program. The program should have two actions. Turn right, when the light sensor senses dark. Turn left, when the light sensor senses light. Thirdly, Make the program to repeat infinitely.

The robot is not actually going straight. The robot actually traces the line and moving forward by turning right and left repeatedly. Let’s say that the line is dark.
The robot’s light sensor will sense the dark line, and turns to left, as the sensor sensed dark. Then the robot’s sensor will be out of the dark line. Now, the sensor will sense light, and as programmed, the robot will turn right. Then, the sensor will go back to the dark line again, and turn left. When these right and left actions are repeated, at the same time, the robot is moving forward by little and little. This is how the robot traces the line.

No comments:

Post a Comment