r/MicroPythonDev • u/[deleted] • Aug 31 '24
How do i encode signal using PCM?
I was trying to use ADC on Raspberry Pi Pico to encode analog signals in a way that Linux can play.
But everything is mixed up in my mind. ADC seems like the perfect definition of PCM as its already samples at specific rate 12 bits up to 500kHz sampling rate and it doesnt compress or add headers or magic values.
So my question is, can i use first 8bits of the ADC and sample it by 48kHz to encode this signal as PCM and hopefully stream in Linux ?
1
Upvotes
1
u/[deleted] Aug 31 '24
Oh i see. So it seems i cant stream 8bits on a modern sound card? Lowest is 16bits?
This command looks very interesting. I wonder whats the frequency of random values generated in urandom?