Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amotl opened this issue Feb 17, 2019 · 0 comments
Open

Comments

@amotl
Copy link

amotl commented Feb 17, 2019

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.

@amotl amotl changed the title Use pyb.ADC.read_timed() interface for more robust audio sampling Use "pyb.ADC.read_timed()" interface for more robust audio sampling Feb 17, 2019
@amotl amotl changed the title Use "pyb.ADC.read_timed()" interface for more robust audio sampling Use "pyb.ADC.read_timed()" interface for more robust audio sampling? Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant