Circuit playground express circuitpython sound sensor

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
truongvc
 
Posts: 4
Joined: Tue Sep 03, 2019 5:48 pm

Circuit playground express circuitpython sound sensor

Post by truongvc »

Hi,

i am trying to transition my class from makecode to circuit python and i was wondering if anyone could tell me if there is an easy way to get the sound sensor to work using circuit python. there's a onLoudSound function on makecode but i can't seem to find anything using circuit python that is as easy as the light sensor for example. did i overlook something or is it just not there? i've seen the sound meter tutorial but it seems a bit too complex for my intro class. any help would be greatly appreciated.

Thanks!

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Circuit playground express circuitpython sound sensor

Post by dastels »

You could take code based on this: https://learn.adafruit.com/adafruit-cir ... ound-meter and make a library that would sample the mic and return an indication of the "loudness" of what is being heard. Precompile that to an MPY file (to reduce it's memory footprint) and use it in their code.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”