I am trying to use this library to connect a Nikon lens to an Arduino. https://lainy.github.io/NikonLens/classlain_1_1t_nikon_lens.html
I'm finding it very hard to understand the correct wiring.
Connections are as follows (with Arduino Uno pin numbers):
SS (10) is unused.
SCK (13) is connected directly to lens SCLK.
MISO (12) is connected to the lens Data line, which must be pulled high.
MOSI (11) drives the lens Data line through a transistor, open-collector. So: MOSI -> Base, Data -> Collector, GND -> Emitter
handshakePin_In is connected directly to lens H/S
handshakePin_Out drives lens H/S through a transistor, open-collector.
I would like help to understand this.
drives the lens Data line through a transistor, open-collector. So: MOSI -> Base, Data -> Collector, GND -> Emitter
It uses a variant of SPI interface. I'm just finding it hard to wrap my mind around it.