Convert your microcontroller to DAC, i.e., digital to analog
This breakout board features an easy-to-use MCP4725 12-bit DAC. Control it via I2C and send the desired value for its output, and the VOUT pin will have it. It's excellent for audio/analog projects when you need more than PWM and require a sine wave or adjustable bias point.
We separate the ADDR/A0 pin so you can connect two of these DACs to a single I2C bus without collision—just tie this pin high to prevent conflicts. It also comes with a 6-pin header for easy use on a breadboard. It works with both 3.3V and 5V logic.
Some nice extras with this chip: For chips with 3.4Mbps Fast Mode I2C (not in Arduino), you can update Vout at ~200 KHz. It has an EEPROM, so if you write the output voltage, you can 'save' it, and it will reload that voltage if the device is powered off. The output voltage is proportional to the rail-to-rail and power pins, so if you run it from 3.3V, the output range is 0-3.3V. If you run it from 5V, the output range is 0-5V.
It includes an easy-to-use Arduino library with an example of a triangle wave and sine wave output that can be used with any "Arduino" or easily ported to any microcontroller with I2C host. The wiring is straightforward - connect VDD to your microcontroller power pin (3-5V), GND to ground, connect SDA to I2C Data (on Arduino Uno, it's A4, 20 on Mega, and digital 2 on Leonardo), SCL to I2C Clock (on Arduino Uno, it's A5, 21 on Mega, and digital 3 on Leonardo), and listen at VOUT.
You can order the MCP4725 Breakout Board - 12-Bit DAC w/I2C Interface from the Adafruit category at SAMM Market with competitive prices, same-day shipping, and fast delivery advantages.