Closed
Description
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; Seeeduino XIAO RP2040 with rp2040
Code/REPL
>>> import board
>>> import audiobusio
>>> audio=audiobusio.I2SOut(bit_clock=board.D8, word_select=board.D9, data=board.D10)
Behavior
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Bit clock and word select must be sequential pins
Description
Attempting to create an I2S object in CircuitPython using the pins D8, D9 and D10 seemingly fails despite the parameters being passed matching the requirements (ie bit_clock
on D8, word_select
on D9).
Additional information
I took a look at the pin definitions for the XIAO RP2040 and realised that, behind the scenes, D10 comes before D9 - D10 is GPIO3, D9 is GPIO4. Swapping the word_select
and data
pins correctly creates an I2S object.
I guess the issue is more that the feedback you get, when trying to create the object, appears on the face of it to be wrong (when in actuality it is differently correct!). I'm not sure what the best thing to do would be to clear this up, so I thought reporting it here would pass it along in front of the eyes of a professional 😄