Adding buttons, LEDs & an OLED to a PySense

I have a lopy4 sitting in a pysense2 board and it appears to all be working without issue. I wasn’t really paying attention when I bought the bits though, as I’m reasonably allergic to soldering and didn’t figure on how to actually hook up the paraphernalia it.

I note with unfounded optimism that the pysense has a “Sensor Header” / “pyport”, which looks like a little 6 pin connector, the style of which I’ve not seen before. Looking at the spec sheet (Pysense 2.0X) it has:

  1. 3v3aux_sense
  2. gnd
  3. SCL
  4. SDA
  5. P9 (EXT_IO_1)
  6. P15 (SENSOR_INT)

so… can I use say, P15 to hook up to a switch? And say, P9 to drive a LED? And so, I’d just be using a little plastic plug and not putting the soldering iron near the pysense?

Or do I need to bite the bullet, and solder something to the External IO and use that?

I guess I’ve resigned myself to soldering something onto the External IO Header and then I can use DuPont connectors to keep going…?

Last question… the PiicoDev OLED module I have (PiicoDev OLED Display Module (128x64) SSD1306 | Core Electronics Australia) - can I drive that via the “Sensor Header”? What kind of plug is it, and is there an adapter I can buy that goes between the 4 pin SH plug PiicoDev stuff and the 6 pin PyPorts?


Hi Damian,

Welcome to the forum!!

The connector in question is a 0.05" pitch IDC cable much like this 2x5 cable. I wasn’t able to track down a 2x3.

Yeah, just note that the pin numbering between boards are a bit odd, for each pin:

  • P15 maps to GPIO38 on the LoPy4 and is an input only
  • P9 maps to GPIO 12 which is capable of dimming an LED via PWM

In terms of sourcing parts to connect everything I’d say this is the easier option, we have a guide on soldering and are more than happy to help with any troubles you might have! (Just make sure to keep everything powered down until you’re happy with the connections).

Electrically the connections are there although I havent tested the PiicoDev OLED with the LoPy so I’m unable to confirm that the software works.
Unfortunately there I couldnt find an off the shelf adapter but you might be able to get something that does 2x3 IDC - Breadboard - PiicoDev Prototyping cable

You can also change the I2C SDA and SCL pins on the ESP32 so using the external IO header shouldnt be an issue.