   int offset_i;
 
   FILE *fp_raw;
-  fp_raw = fopen("/sys/bus/iio/devices/iio:device1/in_voltage0_raw", "r");  //read the values from scale, raw and offset files.
-  fgets(raw, 4, fp_raw);                                                    //we need all three values, because the formula for
-  fclose(fp_raw);                                                           //calulating the actual temperature in milli-degrees Celcius
-                                                                            //is: TEMP = (RAW + OFFSET) * SCALE 
+  fp_raw = fopen("/sys/bus/iio/devices/iio:device1/in_voltage0_raw", "r");  //read the values from scale and raw
+  fgets(raw, 4, fp_raw);                                                    //the formula for calulating the actual voltage
+  fclose(fp_raw);                                                           //is: VOLTAGE = RAW * SCALE 
+                                                                            
   FILE *fp_scale;
   fp_scale = fopen("/sys/bus/iio/devices/iio:device1/in_voltage_scale", "r");
   fgets(scale, 4, fp_scale);

  delay(5000);
}

// reads hardware temp sensor
int getVolt(){
  char scale[4];
  char raw[4];


// create an object of the IoTkit class
IoTkit iotkit;        
int voltage;
char buf[112];

void setup() {
