Little Soundie - Random (Not Delibarately Selected) File Playback

Hello,

I have set up 6 or 7 external momentary switches but utilizing only the ‘first’ 3 GPIO pins (00, 01, 02) - so an attempt to use ‘binary coded’ input.

Physically, when closed (sending 3.3v), the first switch connected to pin 00 (only) will trigger the corresponding file; the second switch connected to pin 01 (only) will trigger the corresponding file; etc. However, once I attempt to wire, as an example, pins 00 and 01 to another switch (with the expectation to play a corresponding file), things start to get messed up - the first switch ends up playing the file associated with pins 00 and 01 (that are tied together). While this makes some obvious sense to me given 00 and 01 have subsequently been joined, how is ‘binary coded’ input actually achieved with physical switches?

I’ve tried different ways to ‘isolate’ the inputs but not solving this problem. The Hookup Guide describes the boards behaviour and shows a circuit example using separate/distinct switch inputs (but not beyond single triggering of a GPIO pin). Hopefully, I’ve made some sense. Does anyone know how?

Thank you.

Can you share a photo of your wiring/setup, and the code being used?

It should work extremely similar to this example https://learn.sparkfun.com/tutorials/li … re-example (please note slightly above that it mentions pin 04 is the first digit of the binary input and pin 00 is the last)

Thank you for your response.

I’m not using any code or microcontroller - just a 3.3v signal delivered to pins when a switch is closed. I’ll do my best to explain (attached photos of circuit):

Attached is a photo of the ‘wiring’ which is utilizing header pins connected to each input. All pins for input 00 are physically connected together as are those for 01, 02, etc. My thought was that this created a binary ‘table’ for the switch inputs so, singly and in combinations, e.g., 00, 01, 00+01, they are then connected to external momentary switches - 7 in total for this project.

Purple - 00 (File 1)

Blue - 01 (File 2)

Green - 00 + 01 (File 3)

Yellow - 02 (File 4)

Orange - 00 + 02 (File 5)

Red - 01 + 02 (File 6)

Brown - 00 + 01 + 02 (File 7)

I was a bit confused about the order of the ‘binary’ values, i.e., the board’s silkscreen shows 00-04 which leads one to think you start with 00 but the guide kind of alludes to an opposite arrangement as you indicate and should consider the latter to be the definitive direction. I have things wired in reverse.

My misunderstanding notwithstanding, in terms of whether you start at one end or another when triggering sounds, does that really matter? I’ve populated the board with 7 files and if I only connect an individual ‘binary’ input, the right file plays - fully populated is when things go awry.