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.

No comments:

Post a Comment