Komut
available()
Açıklama
PDM arayüzünden okunabilecek bayt sayısını alın. Bu, önceden gelen ve PDM alma tamponunda saklanan verilerdir.
Sözdizimi
PDM.available ()
Parametreler
Yok
İadeler
Okunabilecek bayt sayısı
Misal
…
// buffer to read samples into, each sample is 16-bits
short sampleBuffer[256];
// number of samples read
volatile int samplesRead;
// …
// query the number of bytes available
int bytesAvailable = PDM.available();
// read into the sample buffer
PDM.read(sampleBuffer, bytesAvailable);
…
// buffer to read samples into, each sample is 16-bits
short sampleBuffer[256];
// number of samples read
volatile int samplesRead;
// …
// query the number of bytes available
int bytesAvailable = PDM.available();
// read into the sample buffer
PDM.read(sampleBuffer, bytesAvailable);
…