In order to learn and to demonstrate mastery over the Arduino single-board microcontroller that is so popular for small autonomous computer art projects today, Mr. Swirly wrote and open-sourced a robust, reference implementation in C++ of a Morse code generator.

You can find the source code here, and you can see a video demonstrating the result here: