Difference between revisions of "Buzzer (RTTTL)"
Jump to navigation
Jump to search
(Created page with "=== Tones === From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play a tone on a pin, via a speaker or piezo element: '''<nowiki>http://<ESP IP addre...") |
Grovkillen (talk | contribs) |
||
Line 1: | Line 1: | ||
− | === Tones | + | = Introduction = |
+ | |||
+ | = Hardware = | ||
+ | [[File:buzzer.jpg]] | ||
+ | |||
+ | [[File:Piezo_element.jpg]] | ||
+ | |||
+ | = ESP Easy = | ||
+ | |||
+ | == Tones == | ||
From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play a tone on a pin, via a speaker or piezo element: | From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play a tone on a pin, via a speaker or piezo element: | ||
Line 7: | Line 16: | ||
Plays a 1300 hz tone for 200 ms on gpio-14h | Plays a 1300 hz tone for 200 ms on gpio-14h | ||
− | + | == Melodies and ringtones == | |
From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play melodies via [[https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification RTTTL]] | From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play melodies via [[https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification RTTTL]] | ||
− | ( | + | (don't forget to remove the spaces) |
'''<nowiki>http://<ESP IP address>/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-</nowiki>''' | '''<nowiki>http://<ESP IP address>/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-</nowiki>''' |
Revision as of 19:45, 19 July 2017
Introduction
Hardware
ESP Easy
Tones
From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play a tone on a pin, via a speaker or piezo element:
http://<ESP IP address>/control?cmd=tone,14,1300,200
Plays a 1300 hz tone for 200 ms on gpio-14h
Melodies and ringtones
From ESPEasy v2.0.0-dev6 (in the testing plugin set) its also possible to play melodies via [RTTTL]
(don't forget to remove the spaces)
http://<ESP IP address>/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-
This plays a melody on pin 14.
You can also use these from rules. We use it to let our alarm system give feedback to the user via a piezo speaker.
To make a boot-sound on startup, create a rule like this:
On System#Boot do rtttl,14:d=10,o=6,b=180,c,e,g endon