Raspberry Welcome Device
In this lesson, we will summarize the projects of this chapter and explore new projects through different combinations of electronic hardware. We will also prepare for creating your own projects by consolidating the creation and use of software libraries through practice.
Through the study of this chapter, we have put electronic hardware and programming knowledge to practice in solving some practical problems. First of all, let's review what projects we have done and what functions we have built!
There is a lot we can do by combining different sensors and actuators. For example, LEDs can be used as lighting, but also as warning lights or reminder devices; buzzers can be used to play music, but serve as alarm devices. Combining buzzers with LEDs, we can achieve more effective outcomes with both sound and light. Therefore, we should aim to have a more flexible understanding of different electronic modules.
The difficulty of this project is in programming the buzzer to play the welcome music. Looking back at Lesson 8, we need to adjust the frequency and duty cycle of the PWM signal to control the passive buzzer, and we also need to set the seven basic notes individually. Like before, it would greatly simplify our code to use custom functions for
each note. In this lesson, we will further simplify the program by encapsulating the functions of notes into a library.