04 Mission Instructions

9. Iterate

Maybe your robot is behaving perfectly, and you don’t see any need to make changes. But, it’s more likely that your robot is either reacting to some quiet sounds or not reacting to loud ones and you’d like to fix that. 


The most likely culprits are your thresholds. Take another look at your chart on the previous page. How do the values of those sounds compare to your thresholds? How could you change your thresholds to improve your robot’s behavior? 


Once you have your robot responding to the sounds you want it to, think about other changes you might want to make. One thing to consider is that you might not want your robot to drive forward forever after it just heard one quick, loud noise. Maybe it should stop when the sound stops. Maybe it shouldn’t drive forward at all, but should spin in place.


Maybe your home is a little too quiet for your robot and you’re not even sure if it is turned on.  Do you need to add any basic lights or movements to reassure that the robot is actively patrolling for noises?

Think about how you can use the [repeat while] or [repeat until] block to accomplish these goals and plan a new and improved program! How could you use an [if-do-else] block to improve your program? You may also want to use your new and improved programming skills to go back and improve your programs from prior modules — how could you improve your robotic animal program?