Hacker News new | ask | show | jobs
by throwaway219450 38 days ago
Frankly I'm amazed that a solution exists that isn't hundreds of dollars. Some of these niche connectors can be really spendy.

I think rotation is a bit extra though. The frustration with the dupont/0.1" headers is that they're not polarized. As soon as you add a key (or a literal magnetic polarity here), that problem goes away.

There are possibly ways to handle orientation in software. If you did a 4-pin and include VCC, the pinout on the pi is hi-lo-tx-rx, so you could look for hi-lo-hi-hi and wait for some period to identify any logic transitions on the tx pin. There should always be a period where that pattern is correct, because either the output is idle (high) or it's sending a bit sequence which will also involve a high somewhere. If you ever see the "2nd" pin high, you know it's not ground. Then your serial transceiver needs some way of setting up rx/tx or tx/rx (either you remap the pins, software serial, or use an analog multiplexer).