|
Baby Monitoring System
|
Defines 3 songs by frequency and note duration and provides functions to play them on a buzzer connected to an Arduino Nano ESP32. More...
#include <Arduino.h>Go to the source code of this file.
Functions | |
| void | playNotes (int buzzerPin, int notes[], int durations[], int length) |
| Plays each note for a given song. | |
| void | playSong (int buzzerPin, int songNum) |
| Plays the song associated with the given song number using the provided buzzer pin. | |
Variables | |
| int | song1Notes [] |
| Frequency values for notes in "Twinkle Twinkle Little Star". | |
| int | song1NoteDurations [] |
| Durations for notes in "Twinkle Twinkle Little Star". | |
| int | song2Notes [] |
| Frequency values for notes in "Mary Had a Little Lamb". | |
| int | song2NoteDurations [] |
| Durations for notes in "Mary Had a Little Lamb". | |
| int | song3Notes [] |
| Frequency values for notes in "The Wheels on the Bus". | |
| int | song3NoteDurations [] |
| Durations for notes in "The Wheels on the Bus". | |
Defines 3 songs by frequency and note duration and provides functions to play them on a buzzer connected to an Arduino Nano ESP32.
| void playNotes | ( | int | buzzerPin, |
| int | notes[], | ||
| int | durations[], | ||
| int | length ) |
Plays each note for a given song.
| buzzerPin | The pin connected to the buzzer. |
| notes | Array of note frequencies. |
| durations | Array of note durations. |
| length | Number of notes in the song. |
| void playSong | ( | int | buzzerPin, |
| int | songNum ) |
Plays the song associated with the given song number using the provided buzzer pin.
| buzzerPin | The pin connected to the buzzer. |
| songNum | The number of the song to play (1, 2, or 3). |
| int song1NoteDurations[] |
Durations for notes in "Twinkle Twinkle Little Star".
| int song1Notes[] |
Frequency values for notes in "Twinkle Twinkle Little Star".
| int song2NoteDurations[] |
Durations for notes in "Mary Had a Little Lamb".
| int song2Notes[] |
Frequency values for notes in "Mary Had a Little Lamb".
| int song3NoteDurations[] |
Durations for notes in "The Wheels on the Bus".
| int song3Notes[] |
Frequency values for notes in "The Wheels on the Bus".