Global variable changes its value when loop starts again
This:
sprintf(stringBuffer, &quot;Calibration accomplished with value: %d&quot;, calibrationValue);

is a buffer overflow: the function sprintf() is writing a 40-byte
string into a 30-byte buffer. Whatever happens to lie in memory right
after the buffer will be overwritten by sprintf(). Apparently this
happened to be calibrationValue. You should use
snprintf() rather that sprintf(), as the former is designed to
prevent this kind of overflows.
Or better yet, stick with Serial.print[ln]():
Serial.print(&quot;Calibration accomplished with value: &quot;);
Serial.println(calibrationValue);

Edit: You may notice that 13108 is the same as 0x3334, which on a
little endian architecture is stored in memory as 0x34 0x33. These are
the ASCII codes for &quot;43&quot;, which is part of what sprintf() wrote past
the end of the buffer.