Skip to content

Code for playing melodies send to a ntfy.sh topic through passive buzzer connected to ESP8266 made in PlatformIO environment

Notifications You must be signed in to change notification settings

FrameXX/melody-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Melody generator

This is a code for ESP8266 board that has a passive buzzer connected. This code was made in PlatformIO environment. The ESP8266 is able to play a melody (an array of soundwaves) that was send to respective ntfy.sh topic. The default topic is melody-generator.

Message structure

Definition

repeat_count soundwave1_frequency soundwave1_duration soundwave2_frequency soundwave2_duration ...

All arguments are integers.

  • repeat_count - Defines how many times should the melody repeat. When set to 0 the melody will repeat indefinitely.
  • soundwave_frequency - Defines frequency of the played soundwave in seconds.
  • soundwave_duration - Defines duration of the soundwave playback in miliseconds.

Example

0 300 300 500 300

This will play a simple "buup beep" in a fast succession infinitely.

About

Code for playing melodies send to a ntfy.sh topic through passive buzzer connected to ESP8266 made in PlatformIO environment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages