Playing .wav files on TinyFX

Hi all,
I recently purchased a TinyFX starter kit to add lights and sounds to a LEGO vehicle. So far, I have lights installed and working. It’s perfect for the job. Now, I’ve moved on to working on the sound effects. I’ve got the examples for how to get a .wav file to play, however, I’ve had some trouble figuring out how to get the file uploaded to the board. I’ve been using CircuitPython’s web IDE to do my programming, and it has an upload function. However, every attempt I’ve made to upload my .wav file just hangs and never completes.
Is there another/better way of uploading a file to the TinyFX board? Overall, I’ll need 3-4 different effects.

Are you using MicroPython or CircuitPython with your device?. If you use CircuitPython, you will have a drive “CIRCUITPY” that you can treat like an USB-stick. If you use MicroPython, you could use rshell or mpremote to copy files. Maybe Thonny might also work, but I never tried.

Hi @Wsmurphy,

The usual way to upload files to Tiny FX (or any of our other RP boards running MicroPython) is to use Thonny. https://thonny.org/

There is a portable version if you do not wish to install the software: https://github.com/thonny/thonny/releases/download/v4.1.7/thonny-4.1.7-windows-portable.zip

I suspect CircuitPython’s web IDE is expecting the board to appear as a USB mass storage device, which it would do if programmed in CircuitPython, but does not when running MicroPython.

Otherwise, the commandline tool mpremote would let you upload files, as bablokb says.

Thanks so much! I’ll take a look at using Thonny. It sounds like that may be my issue, as I am using the default pre-loaded Micropython.

I ended up using mpremote which met the need perfectly. Thanks, all!

1 Like