Wednesday, February 25, 2009

My Block Is Your Block

For Homework I read chapter 26, my block is your block. This chapter is all about my blocks. My blocks are very useful and have the potential to save you a lot of time in programming and preventing careless errors. My blocks dont have any set action. The action or actions are set by the user. To make a my block, make a normal program in the NXT programming software. If there is a lot of parts that repeat such as a right turn, it would be adventageous to put into a my block. After making the program, select the part you want to make into a my block my holding shift and selecting all the blocks you want. Make sure they are all next to each other in the porgram. Next, while the blocks are still selected, go to edit and make a new my block. In the pop up window, you can change the name and add a description of the block. Click next when you are satisfied with this part and then choose an icon for the block. Your my block is done!!!!!! To save your my block, go to your program and double click on the my block. This will open up a new tab with the my block program in it. Click save and choose the filepath you want to save the myblock to. I used my blocks in the circuit race challenge. I found it was very useful on the right 90 degree turn because it makes sure that the program stays the same for each right turn. Also, it made my program much more manageable because instead of having 5 or 6 blocks for every turn (3 of them), you only have one block. This made it very easy to edit the distances that the robot went on the tape without worrying about accidentaly messing up a forward block. For these reasons, my blocks are very useful tools to help you achieve your programming goals.

Monday, February 23, 2009

Team Challenge: Circuit Race

Today, we did a team challenge: the Circuit Race. The name was a little misleading for this challenge. First of all, I worked solo on this challenge and the second thing was it was not really a race, it was just to see if you you could make the robot go around the square without crossing the black tape line. It was 12 and it was time for the race. I volunteered to go first. The first run, my robot jumped for some reason, something it did not do in the trial runs. This jump caused it to run over the black tape. I was given another chance to start so I re-ran the program and everything went smoothly. To design the program, I first took the measurements off the course. I found out that all the sides were not equal so it was not really a square. I set up the ratios we learned in the wheels and distance lab. I took each side, entered in the correct number of degrees and ran each side one by one until I got the correct distance. Next I had to work on the right turn. I used the measured turns lab and decided to go with the swing turn because it was easier to control. I also turned the power down so the robot would be more accurate and not jumpy. I found that using the ratio, the turn was close but not exact so I had to make some modifications. Since the right turns would always be the same, I set up a myblock that had the right turn programmed in it. This saved me a lot of time, made sure I didnt mess up the program from doing it too many times, and made my program more organized. About the design of the robot: I tried running the course with large wheels at first to go for speed but they were not stable and therefore gave me inconsistent results. I then tried the smaller flat wheels which made the robot slow but very accurate. This is what I did for success in the Circuit Race.

Sunday, February 15, 2009

Movin' and Making Turns

A lot was accomplished in the past week in robotics class. We completed two labs which is a lot especially considering it was a short week. The labs we completed were measured turns and right face. In measured turns, I learned how to get the robot to turn the number of degrees that i want it to. This is done by setting up a ratio using the circumference of the circle and the circumference of the wheel. This is useful if you want the robot to turn a specific direction and be very precise. In right face, we learned the difference between a swing turn and a point turn. In a swing turn, only one wheel spins while the other stops. In a swing turn, one wheel goes forward and the other goes backwards, resulting in a much quicker turn. For homework, I read chapter 4 of the lego programming guide. This chapter was all about the move block. The move block is a useful block that can save you a lot of time. In this block, you can control more than one motor at a time and also the power to each motor. This makes turning while moving forward much easier. This block is not so good for doing swing turns though. It is just as easy to add the two motor blocks and program them accordingly. For the next challenge, Circuit race, I hope to use my knowledge of turning and forward blocks to get my robot to complete the circuit.

Monday, February 2, 2009

“Hello World, My Name Is…”




In this lab, we are creating a traditional program called "Hello world, my name is...". This is a tradition in programming where new programmers create a program where something pops up on the screen and says Hello World, My Name is..... This is done using the display blocks on the NXT programming software. We also programmed the robot to play a sound after moving forward 2 rotations, then playing a victory song after reversing 2 rotations. At the end of the lab, I made a program where after a clap, the robot displays a sad face and plays a sad sound (this is what is shown in the picture). I also did a test with 3 different people to find out if they could guess the mood of the robot and 2 got it exactly and 1 person got it very close. Using the display block, you can put in faces, words, or pictures. This can be useful to help your robot display emotion or communicate with the outside world. In the future, i will add sounds to my robot to help me figure out what part of the program is running. Also, I will use displays to keep my robot lively and display emotions after completing or failing a task.