micropython-i2s-examples icon indicating copy to clipboard operation
micropython-i2s-examples copied to clipboard

Support PCM5100A ?

Open jinyistudio534 opened this issue 2 years ago • 5 comments

Can i use this library with PCM5100A ?

jinyistudio534 avatar May 13 '23 05:05 jinyistudio534

Yes. The library will work with a PCM5100A device.

miketeachman avatar May 13 '23 13:05 miketeachman

Do you think this library can control pico-audio? Do I need to change those codes? https://shop.pimoroni.com/products/pico-audio-pack?variant=32369490853971

jinyistudio534 avatar May 21 '23 08:05 jinyistudio534

Yes. The pico-audio can be controlled with MicroPython, using pins 12 (SD), 14(SCK), and 15(WS). Here is a simple example to try. You will need to change the code to use pins 12, 14, and 15 as shown below :

elif os.uname().machine.count("Raspberry"):

    # ======= I2S CONFIGURATION =======
    SCK_PIN = 14
    WS_PIN = 15
    SD_PIN = 12
    I2S_ID = 0
    BUFFER_LENGTH_IN_BYTES = 2000
    # ======= I2S CONFIGURATION =======`

miketeachman avatar May 21 '23 22:05 miketeachman

12=GP9,14=GP10,15=GP11 and test it OK 👍 elif os.uname().machine.count("Raspberry"): print("Raspberry") # ======= I2S CONFIGURATION ======= SCK_PIN = 10 WS_PIN = 11 SD_PIN = 9 I2S_ID = 0 BUFFER_LENGTH_IN_BYTES = 2000

jinyistudio534 avatar May 22 '23 05:05 jinyistudio534

Great ! I hope you did not waste too much time to find my mistake.

miketeachman avatar May 22 '23 14:05 miketeachman