Sending a squarewave

I am using a DAC+ with a RPi 3B and am creating sounds by reading levels from a textfile and sending them through with pyaudio`s write function.

a need to use the textfiles due to customs sound. but when i try and send out a 1kHz squarewave (made a textfile for that with hard -1 , 1 levels) and i look at the output with an osciloscoop there are harmonics in the signal like the signal is buildup out of sinewaves.

 Does the DAC alter my signal and if so can this be shutdown?

the code I am using

please help



Please sign in to leave a comment.