Wednesday, April 29, 2009

Day 2 - Program

Today I plan to write a program for the challenge course. My program will have the necessary blocks for my robot to finish the course, finishing each challenge that comes in its way with ease. My program will be as follows:

Challenge 1 = Program robot to Start with a "clap" and stop for twenty seconds when it senses a low light value (lower than threshold set).

Challenge 2 = Use touch sensor to sense pillar (knock into pillar), then program to reverse and swing turn left.

Challenge 3 = Program forward and use ultrasonic sensor to sense desk, when it senses it, swing turn right.

Challenge 4 = Program robot to move forward, using the ultrasonic sensor again, sense the randomly placed object and swing turn right then left.

Challenge 5 = Move forward and sense low light value.

My robot design needs to be finished, as well as my program.

Monday, April 27, 2009

Obstacle Course Challenge

The obstacle course challenge might prove to be a difficult course to complete. The course itself is made up of 6 parts which are as follows:

1. Start (NXT) with clap.
2. There will be an outline of a box several centimeters away - program robot to stop within outline and wait for 5 seconds in order to proceed.
3. Bump into pillar, back up and turn right.
4. Sense Wall, turn right w/o touching it.
5. Avoid Obstacle. ---> not so sure how to program robot to pass the obstacle.

Sunday, April 12, 2009

Experience - Line Tracking

The sum of knowledge gained from the few past classes is of great use as we got the chance to experiment with the light sensor as well as learn the behavior and configurations of the light sensor.
In order to learn about the light sensor, we were told to conduct an experiment using the sensor. The experiment is as follows: Robots must be programmed to follow a black line (on a white surface), "using" the light sensor - Line Tracking.
My partner and I first attached the light sensor to the front of the robot; however, we found out that placing the light sensor at the back of the robot, closer to the two wheels, is better because the light sensor will create smaller swing turns, minimizing the chance of the robot going off course during the experiment; additionally, it helps the robot to follow the line at a greater speed. Now on to programming, in order for the the robot to proceed along the black line, we programmed it to make right and left swing turns depending on whether the sensor reads a light value that is less or greater than the threshold set (the threshold is the average of both light and dark readings - test on NXT).


Program:

Chapter 4 - Reading Sensors

Sensors is the main topic of this chapter, as it introduces us to all kinds of sensors
- light, touch, sound, and ultrasonic.
The chapter also tells us of each sensor's behavior and capabilities. Each sensor is useful as it can help robots face many challenges as well as understand its surroundings: additionally, sensors used on a robot is as useful as the human's "five-senses". All humans rely on their five-senses just as robots do, and each "sense" reacts/interacts with certain things differently in order to surpass certain challenges, whether they are simple or difficult.
Recently in class we have been using the light sensor in order to program our robots to follow a black line. Certain things needed to be taken into account - position, and light value. Such considerations are significant to the performance of the light sensor. By using the light sensor to read light values, i programmed the robot to turn right or left depending on whether the light value reading is greater or less than the threshold set (the robot has to perform several swing turns in order proceed along the black line) - light value is important as it is the very thing that determines the robot's next action. Me and my partner ran into a problem, the robot wasn't able to stay on course and so with the help of a hint we suspected the problem was due to the light sensor's position. We placed the light sensor where it would create smaller swing turns - position is important as it determines how well the light sensor performs in specific situations.