# Galactic Unicorn pinout on QW/ST

**URL:** <https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904>\
**Category:** Support\
**Created:** [December 6, 2022, 7:04pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904 "2022-12-06T19:04:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![MistaE-Dogg](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mistae-dogg/32/9265_2.png) [@MistaE-Dogg](https://forums.pimoroni.com/u/MistaE-Dogg)\
**Post date:** [December 6, 2022, 7:04pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/1 "2022-12-06T19:04:14Z")

</div>

I love my Unicorn! I want to teach it to see me. I have a proximity detector and want to hook it to the QW/ST connector. I see the schematic online, but it isn’t clear to me which pin is on the left edge of the connector… like, is the schematic left to right or right to left when I’m looking at the back of the board?

 ![CleanShot 2022-12-06 at 14.03.27@2x](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/3/354358268c499177fc92933bf19e8be1a7d9ebb3.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 6, 2022, 7:42pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/2 "2022-12-06T19:42:00Z")

</div>

Those connectors are keyed, the cables will only plug in one way, the correct way. If that helps.  
[JST-SH Cable (Qwiic / STEMMA QT / Qw/ST compatible) - Pimoroni](https://shop.pimoroni.com/products/jst-sh-cable-qwiic-stemma-qt-compatible?variant=40407104290899)

---

<div class="post-metadata">

**Author:** ![MistaE-Dogg](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mistae-dogg/32/9265_2.png) [@MistaE-Dogg](https://forums.pimoroni.com/u/MistaE-Dogg)\
**Post date:** [December 6, 2022, 7:54pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/3 "2022-12-06T19:54:52Z")

</div>

Yeah, if I had the cable… but I’m hacking together from what I have on hand because the cable won’t be here until Saturday earliest.

It’s a neat project, but I want a proximity sensor instead of having to push a button. Here’s a video:

[![](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/d/dd7bfbbcf46a93ebdeeb80cfc1eabc7d140e0f70.jpeg "Naughty or Nice") ](https://www.youtube.com/watch?v=abzl6qy4YYE)

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 6, 2022, 8:44pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/4 "2022-12-06T20:44:34Z")

</div>

I have a Galactic Unicorn and the cables. I’ll plug one in and get back to you with what pin is what.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 6, 2022, 9:28pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/5 "2022-12-06T21:28:53Z")

</div>

OK, looking at it from the back side it goes like this, left to right.  
Plug 1 - Yellow, Blue, Red, Black  
Plug 2 - Yellow, Blue, Red, Black  
Pinout  
Black - GND  
Red - V+ (3.3V for Qwiic, 3-5V for STEMMA QT)  
Blue - SDA  
Yellow - SCL

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [December 7, 2022, 7:46pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/6 "2022-12-07T19:46:32Z")

</div>

If you are interested in some background: there is a nice article here: [What is STEMMA? | Adafruit STEMMA & STEMMA QT | Adafruit Learning System](https://learn.adafruit.com/introducing-adafruit-stemma-qt). I’m using and mixing all kind of these plugs and cables.

---

<div class="post-metadata">

**Author:** ![MistaE-Dogg](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mistae-dogg/32/9265_2.png) [@MistaE-Dogg](https://forums.pimoroni.com/u/MistaE-Dogg)\
**Post date:** [December 7, 2022, 8:10pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/7 "2022-12-07T20:10:20Z")

</div>

That’s a great link, thanks! I was in fact using an Adafruit proximity sensor with my Unicorn, so some friendly mixing and matching was in play. I found using the Adafruit drivers with Pimoroni’s python was giving me some trouble (like, it wanted to import Adafruit “board” which I think would have been redundant or conflicting with the Pimoroni python libraries) but there were other Python libraries available for my sensor on GitHub that worked fine.

Does anyone have a link for a tutorial about combining Adafruit and Pimoroni stuff?

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 7, 2022, 9:53pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/8 "2022-12-07T21:53:27Z")

</div>

@MistaE-Dogg  
Keep in mind that Adafruit is Circuit Python orientated,  
and Pimoroni is Micro Python orientated.

That can have issues when trying to use one’s library with the others uf2 file.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 8, 2022, 9:55am UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/9 "2022-12-08T09:55:36Z")

</div>

To use an Adafriut Breakout / sensor with the Pimoroni uf2, you have to hunt up a Micro Python Library for it. It’s what I had to do for a UV sensor i wanted to use. There wasn’t any Pimoroni Library for it.

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [December 8, 2022, 10:11am UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/10 "2022-12-08T10:11:58Z")

</div>

Well, there is a compatibility-library called Blinka. I use it regularly on a Pi to run CircuitPython on top of standard python. But according to the docs, Blinka also helps running the API of CP on top of MicroPython. Here is the link: [Overview | CircuitPython Libraries on MicroPython using the Raspberry Pi Pico | Adafruit Learning System](https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico).

I never came around to test this, but I plan to do so one day ;-)

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 8, 2022, 12:17pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/11 "2022-12-08T12:17:19Z")

</div>

Forgot all about Blinka, ops.

---

<div class="post-metadata">

**Author:** ![MistaE-Dogg](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mistae-dogg/32/9265_2.png) [@MistaE-Dogg](https://forums.pimoroni.com/u/MistaE-Dogg)\
**Post date:** [December 8, 2022, 1:40pm UTC](https://forums.pimoroni.com/t/galactic-unicorn-pinout-on-qw-st/20904/12 "2022-12-08T13:40:24Z")

</div>

Just in case someone (or future me ;) ) needs to know, the python driver at

> **[GitHub - liske/python-apds9960: Python APDS-9960 Library](https://github.com/liske/python-apds9960)**
>
> Python APDS-9960 Library. Contribute to liske/python-apds9960 development by creating an account on GitHub.

works just fine for the Adafruit APDS9960 Proximity, Light, RGB, and Gesture sensor. You just set up the connection and it’ll go. That’s what was provoking this whole thread in the first place. But I’m definitely going to go look at Blinka. Thanks for the tip!
