Wio Terminal GPIO pins in CircuitPython

I’d like to use the Wio Terminal to do some MIDI I/O in CircuitPython. I’m using a standard DIN MIDI connector, not USB, because I want to communicate with synths and keyboards, not the USB host PC,

I’ve got a breakout board with the DIN plugs and opto-isolator. I can wire that to four of the GPIO pins. +5v and GND are obvious, but which two pins should I use for send/rev of the internal UART? I’ve gone with pins 8 and 10 since they’re labeled TXD and RXD.

And once I’ve done that, how do I tell CircuitPython which pins to read/write? I found some code at Adafruit’s site that shows how to do it on a different board, but it uses constants board.SDA and board.SCL … that’s not working for me (nothing happens) so presumably those are the wrong pins, but I can’t come up with names for the pins I’m using. Every name I’ve tried gives a compile error.

Hi Snej, I’m the lead of CircuitPython for Adafruit. You can find all of the available names for any Python by printing out the result of dir() on it. For example:

import board
print(dir(board))

In this case, I think you want board.TX and board.RX.

1 Like

Thanks for the help! Those names did work, although I had to swap the wires to the actual TX and RX pins to get any data … see my other thread about that.