Summary

In this chapter, we saw how to connect both a speaker and a piezo buzzer to an Arduino. We then learned how to use the tone() function to create sounds and also play a song. We also saw how we could install and use a third-party library so we could play RTTTL files.

In the next chapter, we will look at how we can use LCD displays to display messages.

Get Mastering Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.