Set up your Gemma M0


We’ll code this project using the Arduino IDE. First, install the Arduino IDE by following this guide

Then, follow this guide on using the Gemma M0 with the Arduino IDE

Be sure to set up the Arduino Preferences with this URL in the Additional Boards Manager URLs field:

Add the proper boards to the Board Manager for the Gemma M0:

  • Adafruit AVR Boards - Includes support for Flora, Gemma, Feather 32u4, Trinket, & Trinket Pro.
  • Adafruit SAMD Boards - Includes support for Feather M0, Metro M0, Circuit Playground Express, Gemma M0 and Trinket M0
  • Arduino Leonardo & Micro MIDI-USB - This adds MIDI over USB support for the Flora, Feather 32u4, Micro and Leonardo using the arcore project.


The Gemma M0 doesn’t have a traditional AM radio transmitter circuit built in, but it is possible to transmit by using this clever DAC/DMA hack.

In short, it is possible to use the digital-to-analog converter (DAC) in an unintended way by sending it messages very quickly using direct memory access (DMA) — so quickly that the frequency of the analog write pulses actually generate AM radio waveforms!

Check out this page for more info:

Install the ZeroDMA library as directed here

To test it all out, and confirm that it's all working, in Arduino open Examples > Adafruit_AMRadio > melody and upload it to your Gemma M0. Clip a wire to the A0 pin to act as an antenna. Hold it close to an AM radio tuned to 540 AM and you’ll hear a familiar song!

Now that we know it’s working, we’ll use a modified version of the original code to send Morse code messages, instead of tone melodies.

Last updated on 2018-03-08 at 02.45.23 PM Published on 2018-03-08 at 02.51.51 PM