Issues in getting FFT to work on Arduino using my own code

I did that using a sine wave lookup table, it matches the theoretical data. It just doesn't run on the Arduino correctly.

I'll make the changes. Thanks.