The beauty of open source โœจ
While writing a demo for one of my boards to exercise the speaker, I hit a bug in ESPHomeโ€™s RTTTL component. So I went ahead and fixed it!

My first direct contribution to @esphome
๐ŸŽ‰

Now my demo can work and I learned new things along the way.

My collection: https://github.com/fortuna/ESPHomeCollection

PR: https://github.com/esphome/esphome/pull/10381

#ESPHome #ESP32 #OpenSource #RTTTL

GitHub - fortuna/ESPHomeCollection: Collection of ESPHome YAML definitions for various boards and dev kits

Collection of ESPHome YAML definitions for various boards and dev kits - fortuna/ESPHomeCollection

GitHub
This whole project has been made easy by a lot of #opensource code, like #esphome, all the libraries it uses for #neopixel #leds, #rtttl, the wifi stack etc, so I feel I had to return something. That's why i took some time to draw the schematics and publish it, along with the yaml config file, in this repository: https://git.ichibi.eu/penguin86/luna-hexagon
If you want to build your own, or you are just curious, take a look at it!
(End of ๐Ÿงต!)
luna-hexagon

A simple lights and sounds game for babies between 6 and 12 months old

Gitea: Git with a cup of tea
You can find a whole lot of huge zip files containing wagonloads of #RTTTL #ringtones in the form of text files. There's some baby songs, but the vast majority it's stuff you would have had as ringtone at that time. That's why one of the songs I chose is #moonlightshadow ๐Ÿชฉ
That's SO 80s!
Also, I couldn't miss #supermario and #monkeyisland themes.
๐Ÿงต
The funniest part, howewer, is how I made it #play #music. I know I can toggle a pin to produce a square wave with a certain frequency, but I don't know anything about music and correspondence between notes and frequencies, and I surely didn't want to reinvent the wheel.
The recommended way to play music with a #microcontroller is to use a #DAC meant for that, or some sort of polyphonic chip, but I needed a simpler and hackier way.
And i found it in the awesome #esphome documentation: https://esphome.io/components/rtttl.html
ESPHome supports #RTTTL. What's RTTTL? Do you remember painstakingly typing letters on your #Nokia gummy keyboard, copying it from some #90s magazine, to have the last and greatest #ringtones? Yes, that format was called RTTTL, and is supported by ESPHome! What a trip in the past!
I'm deadly serious, just look at the relevant wikipedia page! https://en.wikipedia.org/wiki/Ring_Tone_Text_Transfer_Language
๐Ÿงต
Rtttl Buzzer

Instructions for setting up a buzzer to play tones and rtttl songs with ESPHome. **NEW:** Or play the song using the I2S speaker.

ESPHome

I knew this was a bad idea before I started, but I did it anyway: Nyan Cat, rendered as a crude RTTTL ringtone, except played back through multiple little PC speakers, some dropped 1 or 2 octaves, some ยฑ1 Hz on the note to get beat frequencies.

It sounds, naturally, terrible โ€” and yet it has a certain l'air du merde to it

#NyanCat #RTTTL #MicroPython