EdVenture 6 – What’s the hurry? Let’s wait!
Meet the event in the event wait icon
Edison can wait for more than just time. He can wait for a specific event to occur before progressing through your program. This program takes advantage of Edison’s clap sensor.
How the program works
Once again we have a loop, which you should be familiar with now. The first icon in the loop is the event wait icon and is set to wait until a clap is detected, so the program will wait here until a clap is detected. Once this happens, the program progresses to turn on the right and left LEDs and encounters another event wait icon with the same settings as the first one. When another clap is detected the program progresses to turn off the right and left LEDs, and loops around again.
The clap detection sensor becomes overwhelmed with noise when the motors are running, so you can’t detect for claps while Edison is driving.
As mentioned earlier Edison uses an electronic component called a piezo transducer to both make sound and detect claps. Piezo transducers have two plates that are separated by a thin layer of ceramic. When an electrical signal is applied to the two plates they move, which produces sound. They also work in reverse, when sound or vibration is applied to the plates they produce an electrical signal.
The name piezo comes from the Greek language meaning press or squeeze and a transducer is anything that converts one form of energy into another (i.e. sound energy into electrical energy and electrical energy into sound energy).