This example is a very basic RTTY decoder, similar to the FSK decoder explained previously. It doesn’t look for a start byte, uses no bit synchronization. It oversamples 3 times (divides one bit length count of samples into 3 pieces called chunks) and decides between 0 and 1 by calculating the dominant frequency in these chunks. After the loop gathered 8 bits it reconstructs the sent ASCII byte using the Baudot code and displays it. Operates poorly even with a little noise on the channel.

// calculating the fft of the data, so we will have spectral power of each frequency component// fft resolution (number of bins) is samplesNum, because we initialized with that value
fft.complexForward(fftData);