ArduinoFFT majorPeak outputs wack frequency

I'm trying to compute the dominant frequency from a note played on my bass guitar i.e. i expect to get 110hz when playing the A string. The majorPeak() function outputs weird numbers like 2.39 or other low numbers that seems almost random. I copied most of the code from a tutorial (might've been arduinoFFT docs):

#include <arduinoFFT.h>
const uint16_t samples = 128; //This value MUST ALWAYS be a power of 2
const float samplingFrequency = 2048;

unsigned int samplingPeriod;
unsigned long microSeconds;
double vReal[samples];
double vImag[samples];

ArduinoFFT<double> FFT = ArduinoFFT<double>(vReal, vImag, samples, samplingFrequency); /* Create FFT object */

void setup() {
  Serial.begin(115200);
  samplingPeriod = round(1000000*(1.0/samplingFrequency));
}

void loop() {
  for(int i=0; i<samples; i++){
    microSeconds = micros();

    vReal[i] = analogRead(A0);
    vImag[i] = 0;
    Serial.print(vReal[i]);
    Serial.print(" ");
    Serial.println(i);
    while(micros() < (microSeconds + samplingPeriod)){/*do nothing*/}
  }
    // Get samples
    FFT.windowing(vReal, samples, FFTWindow::Hamming, FFTDirection::Forward);  /* Weigh data */
    FFT.compute(vReal, vImag, samples, FFTDirection::Forward); /* Compute FFT */
    FFT.complexToMagnitude(); /* Compute magnitudes */
    double x = FFT.majorPeak();

    Serial.println(x);

    while(1);
}

I'd appreciate any help.

If the input data is random noise, the output is meaningless (garbage in, garbage out, or GIGO, is a computing term that dates to the 1960s).

Print out examples of the arrays for input to the FFT and output magnitudes of the FFT and see if the values make sense. Does the input look like an audio signal?

@atnonnn
You can't have all those prints in the for loop, it screws-up the sampling rate.

Change the samplingPeriod to unsigned long
For loop like this:

  for(int i=0; i<samples; i++)
	{
    vReal[i] = analogRead(A0);
	delayMicroceconds (samplingPeriod);
  }

Use a separate for loop to fill vImag[i]=0