04 Mission Instructions

Your mission is to create a robot that reacts to how loud the environment is around it. 


6. Code: Lowest Threshold

When we programmed our biomimetic animal to respond to light, we used an if-do structure to check the light value. It meant that we needed to keep running the Bloxter programming every time we wanted to see if the light value had changed. This time, we are going to improve on our programming with a new block. This block will keep checking the value until it is larger than our threshold. 


A [repeat forever loop] tells Bloxer to keep doing something forever (or until you end the program). Instead of having to press a key every time you want to check the sound level in the room, the robot will keep checking on its own. You can leave your robot on patrol and go do something else. 



Think about how your robot will listen for a sound and start up the lights or motors when the first threshold is crossed. 


Check out our example code below to give you some ideas.  But keep in mind, your robot response might be more complicated - eyes, colors, blinking, turning, etc.