Wednesday, April 29, 2009

Day 2

Today I am finally finished with my robots design with all the sensors attached. Now lets talk about the programming so far I've just started and planning to finish it I will start with the first part which is the clap and move on to the light sensor reading and stop at the middle of the box for 5 seconds and then the touch sensor so far my robot has no issues but to be prepared I will test it out over and over again.

Monday, April 27, 2009

Obstacle Course Challenge

In this challenge I need to make my robot use all of its sensors such as sound, light, ultrasonic, and touch to complete the obstacle courses which contain 6 steps. First start with a clap(sound sensor), second stop 5 sec in the box, third bump into the pillar and turn right (touch sensor), fourth sense the wall and turn right (ultrasonic sensor), fifth avoid object(ultrasonic sensor), sixth stop after the line.

Chapter 11 and 12

These chapters are about loop blocks and switch blocks. Loop blocks is a block that can't really do much if it is alone accept when you are combining it with other commands. Now I will tell you how to use a loop block to use a loop block you first drag the loop block into the program and then drag the commands into the loop so that the program can repeat itself. Then if you look at the bottom of the loop box setting you can see that you have 5 choices such as loop forever, loop sensor which means when a sensor comes in contact, loop in amount of time, loop count, loop logic. Chapter 12 is about switch blocks they are blocks that command the robot to do one task only and that is if something happens or not but also can do two commands. By doing more than two commands you must unselected the flat view box and that allows you to do 2 commands.

Thursday, April 16, 2009

Line Tracking

In the lab "Line tracking" we had to experiment the light sensor and also learn about its behaviors and programing system. Robots must be programmed to follow a black line on a white surface using the light sensor. First we put the Light sensor to the front of the robot but found out that it made to many errors, putting the light sensor at the back of the robot is better because if the sensor is closer to the wheels there are minimum chances of errors. We programed it by first placing a loop around the main program which makes your robot run at certain time or run the program longer. Set your loop and run it while it is less than 12 seconds. Then add the light sensor next to a loop around the move blocks so that it can make a decision on whether it is light it will turn left or if its dark it will turn right. Since the light sensor is set at the back of the robot it will work better because it is close to the wheels.


Tuesday, April 14, 2009

Chapter 4

In chapter 4 it is all about reading sensors such as light, ultrasonic, and touch. One of the most important components of a robot is the sensor which helps the robot to communicate with its surroundings and perform action based on feedback's. Sensor reading is when a sensor is reading the intensity and translating it into a reading. The first is the touch sensor its where you press a button so that a circuit is completed and electricity flows. In the NXT there is a sensor block that has three states pressed, released, and bumped these are critical to the robot because it allows you to determine how the robot will react. The second is the light sensor which detects surrounding light and measures its intensity. Values depend on the intensity of light that hits the sensor at the time you read its value. The next sensor is ultrasonic sensor which uses sound waves to detect obstacle. It uses high frequency sounds which bounces off objects and is read by the sensor the time each pulse takes to bounce back determines how far the object is. It uses value to allow the robot to steer away or back up. Using light sensor I first have to use the threshold which will divide the light value and dark value and it is essential. The process for getting your robot to follow a line is first set a cut of point in your threshold so that the robot can sense light and dark value then program in such a way that when the robot senses dark it turns right and when the robot senses light it turns left.