                             &load1_array[analog_index], &load1_pin);
   load2_average = smoothing(&number_of_readings, &load2_total,
                             &load2_array[analog_index], &load2_pin);
-
+  v_in = smoothing_Vin(&number_of_readings, &v_in_total, &v_in_array[analog_index]);
   //////////////////// For debugging
   // Serial.println(analogRead(load1_pin));
   // Serial.println(analogRead(load2_pin));
   // Serial.println(load2_average);
   // Serial.println(load2_average);
+  //Serial.println(v_in);
 
   //Convert analog signal to voltage
   load1_v_out = load1_average / 1023 * v_in;

// 9. Software Serial to FFT
//10. Node Metadata
#include <SoftwareSerial.h>


//Analog sensors
//+5V Position Sensor

float load2_total = 0.0;

float v_in = 5.04;// Measure and correct the V in.
float v_in_total = 0.0;
float v_in_array[number_of_readings];

float load1_v_out = 0.0;
float load2_v_out = 0.0;
float res_1 = 50350.0; // Measure the value of R1 in voltage divider circuit.
