Avalog voltage from a pulse wave signal.

Hello everyone, I was able to acquire a PPG (photoplethysmogram) signal, obtained by using a pulse oximeter which illuminates the skin and measures changes in light absorption. What I am struggling is that I need a Analog voltage read from one user, for example lets say I place my finger on the device my analog voltage is 345mV for example yours might be 239mv, this is where I am struggling. how do I get one analog voltage read from one user finger. The code is attached below its a re adaptation of arduino smoothing code. If you proposed to change the code please post the code u suggest.

const int numReadings = 10;

int readings[numReadings];        // the readings from the analog input
int readIndex = 0;                // the index of the current reading
int total = 0;                    // the running total
int average = 0;                  // the average
int inputPin = A0;
int voltage = 0;

void setup() { 
  Serial.begin(9600);                                                        // initialize serial communication with computer
  for (int thisReading = 0; thisReading < numReadings; thisReading++) {      // initialize all the readings to 0:
    readings[thisReading] = 0;
  }
}

void loop() {
  total = total - readings[readIndex];             // subtract the last reading
  readings[readIndex] = analogRead(inputPin);      // read from the sensor
  total = total + readings[readIndex];             // add the reading to the total
  readIndex = readIndex + 1;                       // advance to the next position in the array

  if (readIndex >= numReadings) {                  // if we're at the end of the array...
    readIndex = 0;                                 // ...wrap around to the beginning
  }

  average = total / numReadings;                   // calculate the average:
  Serial.print(average);                           // send it to the computer as ASCII digits
  
  float voltage = (average * (5.0 / 1023.0)*1000);
  Serial.print(" "); 
  Serial.println(voltage);
  delay(1);                                        // delay in between reads for stability
}
void loop() {
  total -= readings[readIndex];             // subtract the last reading
  total += readings[readIndex++] = analogRead(inputPin);      // read from the sensor

  if (readIndex >= numReadings) {                  // if we're at the end of the array...
    readIndex = 0;                                 // ...wrap around to the beginning
  }

  average = total / numReadings;                   // calculate the average:

(uncompiled, untested)

is it not my code?

Try initializing readings to the current analog input instead of 0:

for (int thisReading = 0; thisReading < numReadings; thisReading++) {      // initialize all the readings to 0:
    readings[thisReading] = analogRead(inputPin);
}

Munna9310:
is it not my code?

No. It is shorter.