Stops the ADC and sends the current buffer to the callback for processing
Not available on the imp004m or imp005
This method stops the sampler. If there is a partially-filled buffer at the moment sampling stops, it will be sent to the callback registered with sampler.configure(), with the callback’s byteCount parameter indicating how much data the buffer contains.
Sample at 1kHz from pin 2 for four seconds. After four seconds, we stop sampling by calling **hardware.sampler.stop()* in the function stopSampler().