So we were asked to reproduce the function generator and oscilloscope as a virtual instrument for our final exam. But I'd like to focus on the function generator. The audio generator GW Instek GAG-809/810 has only a single button for the waveform wherein the user would just press it repeatedly to show the desired waveform (i.e., sine wave, square wave). Yeap, the audio generator only have the two waveform but our professor wanted us to add the generator's feature, that is, for the users to be able to display the wave into sawtooth and triangle wave.
So how do we construct it, that different wave forms would display everytime we press the button?