89. Multi-Waveform Generator

Use any microcontroller to generate sinetriangle, and square waveforms. Control the amplitude and frequency using two potentiometers. A pushbutton is used to switch between waveform types.

Specifications:

  • Waveforms: Sine, Square, Triangle.
  • Controls:
    • Potentiometer 1: Adjust amplitude.
    • Potentiometer 2: Adjust frequency.
    • Pushbutton: Cycle through waveform types (Sine → Square → Triangle → back to Sine).
  • Default: Start with a sine wave on boot.
  • Real-time Response: Changes in potentiometer values are reflected instantly on the output.


Example Waveforms:

Sine Wave: Smooth sinusoidal oscillation.

Sine-Wave-Output


Triangle Wave: Linear rise and fall.

Triangular-Wave-Output


Square Wave: Sharp high/low transitions.

Square-wave-output

 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!