Back to Parent

The biggest obstacle I encountered was getting the piezo buzzer to work. Initially, I wanted the piezo buzzer to play a tune for the alarm, but I didn't realize that the tone() function could only be used with specific pins. I played around with the wiring and code for a while before I found, through the Spark webpage, that tone() only works with specific output pins. I also found that you can simply turn the buzzer on and off by sending a digital high and low signal. I chose to use this simpler method because it made the buzzer louder and more annoying, which should better alert the homeowners and drive away the invaders or intruders. 

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!