Introducing Suave Streams

Welcome to Suave Streams at where I’ll be taking some time twice a week to build some of the coolest, funniest, and also innovative pieces of software using real-world patterns, practices, and tools.

Come for a laugh, come to build, and come to learn! We’ll be jumping into languages, and tools like:

  • C#
  • TypeScript
  • Kotlin
  • Swift
  • ASP.NET Core
  • Alexa Skills
  • Actions on Google
  • Bixby Capsules
  • Conversational AI
  • Real time communications
  • Xamarin/Maui.NET
  • UWP
  • Game Development
  • Bot building

and so much more!

We’re starting off with a schedule of every:

  • Sunday 12:30-4:30PM EST
  • Wednesday 6-10PM EST

I hope you’ll join for our first ever livestream this Sunday, May 22nd at 12:30pm EST where we are starting to build an Alexa Skill to Beat Call of Duty Warzone! Using:

C#, ASP.NET Core APIs, SignalR, UWP, Alexa Skills SDK, and scalable architectures and design patterns to make it come to life.

After each stream, I’ll also be uploading the whole recording (with minor edits) to my YouTube over at

So if you can’t make the stream, you won’t miss out on all the fun. Be sure to follow me on twitch for updates on when I go live and to keep up with the projects we start creating!

See you there!




Meadow.Tip – Playing Jingle Bells with a Piezo Speaker Using C#

I was lucky enough to be one of the early backers of the new Meadow board series from Wilderness labs and have since received my board as well as Hack Kit Pro! In this series, I explore and share some of the things I built for fun or for real. Check out wilderness labs here:

Playing Jingle bells

One of the basic samples of using the Meadow.Foundation SDK was playing a single note on repeat using a Piezo speaker. Peep that here:

Where the main class that implements the communication to the speaker is:

public class PiezoSpeakerApp : App<F7Micro, PiezoSpeakerApp>
    readonly IDigitalOutputPort port;
    readonly IPwmPort pwm; 
    readonly PiezoSpeaker piezoSpeaker;

    public PiezoSpeakerApp()
        pwm = Device.CreatePwmPort(Device.Pins.D05);
        piezoSpeaker = new PiezoSpeaker(pwm);


    protected void TestPiezoSpeaker()
        while (true)
            Console.WriteLine("Playing A4 note!");
            piezoSpeaker.PlayTone(440, 1000);

The application builds a reference to the Piezo speaker through the Digital 05 port and ground, then proceeds to blast the A4 note on repeat until your ears bleed. This is a nice tool to use to make sure your circuit is setup properly, but I wasn’t satisfied…

As a musician, I’m always on the hunt for pleasant notes, little riffs, chords, etc. So naturally, I started looking up some note frequencies I didn’t know off the top of my head and stringing them together.

One of the first songs guitarists learn when first picking at strings and learning the fretboard is Jingle Bells! So what a great way to teach myself how to develop basic melodies using a single output speaker and my brand new Meadow F7 Micro! With that in mind, you can find the entire source for the app here:

And here’s the guts of the main jingle bells class for the meadow app:


public class JingleBellsApp : App<F7Micro, JingleBellsApp>
    readonly PiezoSpeaker piezoSpeaker;

    const int LENGTH = 26;
    const string NOTES = "eeeeeeegcde fffffeeeeddedg";
    readonly int[] BEATS = { 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };
    const int TEMPO = 300;

    public JingleBellsApp()
        piezoSpeaker = new PiezoSpeaker(Device.CreatePwmPort(Device.Pins.D05));


    protected void PlayJingleBells()
        while (true)
            Console.WriteLine("Playing jingle bells!");
            for (int i = 0; i < LENGTH; i++)
                if (NOTES[i] == ' ')
                    Thread.Sleep(BEATS[i] * TEMPO); // rest
                    PlayNote(NOTES[i], BEATS[i] * TEMPO);

                // pause between notes
                Thread.Sleep(TEMPO / 2);
            Console.WriteLine("From the top!");
    void PlayNote(char note, int duration)
        char[] names = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
        int[] tones = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };

        // play the tone corresponding to the note name
        for (int i = 0; i < names.Length; i++)
            if (names[i] == note)
                piezoSpeaker.PlayTone(tones[i], duration);

I wanted to make the song more configurable, so I broke the melody out into the notes as a string, and the beats for the song to go along with it. You can also play with the TEMPO to speed things up or slow them down. I also built a private PlayNote method that takes in the major note character and the duration and executes the MeadowFoundation piezoSpeaker.PlayTone to execute the tone on the speaker that was initialized earlier in the contstructor.

So with all these things together, the PlayJingleBellsMethod() takes those constant values and the initialized piezoSpeaker and infinitely loops the entire song. Within the while loop, we use a for loop to play the number of beats that we registered in the LENGTH const and proceed to pull out the beats and notes from the arrays above to string the song together.

When setting up the circuit for your Piezo speaker, just make sure you have the black wire to ground on your board, and red to the port you registered in your constructor (in this case D05). Here’s a fritzing diagram of a simple setup for it:


That’s all there is to it! Stay tuned for more fun projects and how to setup them up as I keep working through how to build some different fun things with my new Meadow board!

If you like what you see, don’t forget to follow me on twitter @Suave_Pirate, check out my GitHub, and subscribe to my blog to learn more mobile and AI developer tips and tricks!

Interested in sponsoring developer content? Message @Suave_Pirate on twitter for details.

I’m the Director and Principal Architect over at Voicify. Learn how you can use the Voice Experience Platform to bring your brand into the world of voice on Alexa, Google Assistant, Cortana, chat bots, and more: