The board has arrived, as well as the microphones. I moved all the components over, and added the microphone and speaker:
A simple example confirms that the microphone works, and that it's easy to see when it is being blown into:
import board
import array
import audiobusio
mic = audiobusio.PDMIn(board.TX, board.A2, sample_rate=16000, bit_depth=16)
samples = array.array('H', [0] * 160)
while True:
mic.record(samples, len(samples))
mean = sum(samples) / len(samples)
energy = sum(abs(sample - mean) for sample in samples)
print(energy)
Now to program some output...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.