Wednesday, May 16, 2012

Week 6: Full House Coding with My Blocks



Since last week all the coding has been completed. This was acheived by creating My Block's for moving into one room after another. This resulted in four different blocks that when put into one sequence would allow the robot to move from room to room and search each one in turn for the flame. If the flame was found, the robot would move towards it and turn the fan on. Each My Block uses a similar sequence to the one shown in our last blog post.

This week it was decided that the infrared sensor wasn't fit for the job as the differences in readings between the room with the candle in and a room without the candle were too small to be reliable in identifying the flame everytime. It was decided to use a second light sensor instead as this would be more reliable.

This is the code within My Block for the 1st room:
This is the code within My Block for the 2nd room:
This is the code within My Block for the 3rd room:
This is the code within My Block for the 4th room:
This is the final code:

As of now this code should work, but to make sure it does we will test it out thoroughly during the lab period.

No comments:

Post a Comment