So you changed "samplingFrequency = 100; //Hz, must be less than 10000 due to ADC" to 16000? Do you really think that 16000 is less than 10000?
BTW even if you could use a sampling frequency of 16000 that would only work for audio frequencies up to 8000Hz. Anything over that present in the signal could cause all sorts of problems.
Steve