In this lesson students will create a personalised musical buzzer by programming the LilyPad Arduino to play a sound using the Main board, Buzzer and Button, coding the note frequency in Arduino IDE. The lesson can be extended to include LED’s that light up or flash according to the note played to enable the buzzer to be used for the hearing impaired.
During the testing phase, the LilyPad components will be connected using alligator clips before progressing to hand stitching them together using conductive thread for a final product that can be held in a person's hand or attached to their clothing.
The buzzer is to be personalised with a tune or tone of the student's choosing and will be used as an alert system for a person who is incapacitated.
An understanding of basic circuitry is essential for this activity as it is important that the threads do not cross over or touch as you may short circuit the board.
Simple hand stitching skills would be beneficial but not essential as the components can be connected with alligator clips.
The teacher should have an understanding o
This activity can be completed in small groups or individually depending on the experience of the students with the technology & Arduino IDE
// Pin the buzzer is attached to
int buzzerPin = 5;
// Pin the button is attached to
int buttonPin = A3;
// Variable to store the button's state
int buttonState = 0;
// Set a time in milliseconds for all delays
int delayTime = 100;
const int C = 1046;
const int D = 1175;
const int E = 1319;
const int F = 1397;
const int G = 1568;
const int A = 1760;
const int B = 1976;
const int C1 = 2093;
const int D1 = 2349;
// Set the buzzer pin as an OUTPUT
//Set the button as INPUT
buttonState = digitalRead(buttonPin);
if (buttonState == LOW)
// Call a function named playSong()
// Use noTone() to shut off the buzzer and delay to create a 'rest'