Example Code

MyDAQ audio signal and FFT Community Example

Code and Documents

Attachment

The following vi is an example of a myDAQ application.

Utilising the audio input 3.5mm jack of the myDAQ, an audio signal can be output from a range of devices

a phone playing music
an electric guitar
mp3 player

The signal that is received by the myDAQ is then displayed in an updating graph on screen, giving the highest amplitude reached so far in that session, and also the highest amplitude currently displayed on the graph.


After the session is stopped, the signal is then Fourier Transformed, the transform is displayed on a graph to give peaks of the most common frequency played.

Thanks,
Justin, Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors