Skip to content

Use "pyb.ADC.read_timed()" interface for more robust audio sampling? #1

Description

@amotl

Hi @jacobron,

first things first: Thanks so much for conceiving this data logger and also for sharing your design files and firmware code with the community. Keep up the spirit!

I found a short opportunity to quickly look at the code and found a specific thing I would like to mention here. As we can see with these lines initializing the ADC

from machine import ADC

adc_mic = ADC(0)
adc_mic.init(bits=12)
adc_mic_c = adc_mic.channel(pin='P13', attn=ADC.ATTN_11DB)

and later code for stuffing data into the buffer, this uses the highlevel ADC interface from the machine package.

On the other hand, I found the lowlevel ADC interface from the pyboard package provides convenient read_timed() and even read_timed_multi() methods. This feels a little bit like it would be more efficient when shuffling data around. What do you think about this?

With kind regards,
Andreas.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions