laagland wrote: ↑
Mon Jul 16, 2018 3:27 pm
Also, more than 2 docks should be possible.
If you need to identify one of a number of docks you can extend the third pin open / short to 0V solution to each dock having a different resistor in each. You can measure the resistance, using a voltage divider and ADC or the time taken to discharge a capacitor.
Or you could get fancy and have a small micro in each dock and have it send a serial ID code and have the Pi read that using its UART. Or put a 1-wire device in each dock and have the Pi read its serial number.
If happy to have a larger connector, D-9 say, you could use more pins and hard code a binary open / short to 0V pattern in the dock, have the Pi read that. Or have the Pi determine which pins are shorted together or connected via diodes.