In this guide we'll take a few simple parts, add some not quite as simple code, and build an adjustable waveform generator (aka frequency generator). Using a rotary encoder push-switch, we'll select one of multiple waveforms, and using the rotation along with the three buttons on the OLED FeatherWing we'll adjust the frequency. We have great guides on the Feather M0 Express and Feather M4 Express as well as the OLED Featherwing to get you up to speed on this hardware.

A small speaker is useful to listen to the signal as a functional test. There's a nice one listed below but there are others; any 8 ohm speaker will work.  The signal isn't very strong, so stick with a small one. You can easily power this by the USB port, but a LiPo battery will let you use it on it's own, untethered from a computer.

This project will work on either a Feather M0 Express or Feather M4 Express. Due to the additional performance and memory of the M4 board, capability of the code can be increased. This is pointed out in the code.

Angled shot of a Adafruit Feather M0 Express - ATSAMD21 Cortex M0.
At the Feather M0's heart is an ATSAMD21G18 ARM Cortex M0+ processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new 

- or -

Angled shot of a Adafruit Feather M4 Express.
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox,...
Angled shot of a Adafruit FeatherWing OLED - 128x32 OLED Add-on For Feather connected to a white breadboard and a lithium battery.
A Feather board without ambition is a Feather board without FeatherWings! This is the FeatherWing OLED: it adds a 128x32 monochrome OLED plus 3 user buttons to...
Rotary Encoder with rubbery knob
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it...
Mini Oval Speaker with pico blade connector
Hear the good news! This wee speaker is a great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like...

Other Parts and Tool

Angled shot of half-size solderless breadboard with red and black power lines.
This is a cute, half-size breadboard with 400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm x 5.5cm with a standard double-strip in the...
Bundle of multi-colored multi-length wire jumpers
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent...

This guide was first published on Oct 17, 2018. It was last updated on Mar 16, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.