Skip to main content

sampler.start()

Starts the ADC

Availability

Device
Not available on the imp004m, imp005 or imp006

Returns

Nothing

Description

This method tells the sampler to begin converting analog signals to digital data. It returns immediately: sampling proceeds under interrupt, and the callback passed to sampler.configure() will receive the sampled data buffer by buffer as they are filled.

Example Code

Sample pin 5 (imp001 or imp002) at 8kHz and A-law compress the data, for four seconds. The buffers will contain 8-bit A-law data. After configuring the sampler, we call hardware.sampler.start() to begin the process.