I picked something, but take a better look here:
https://nanorivertech.com/viperboard.html#api Particularly this function: Nano_GPIOAGetInterruptInput()
In microcontroller terms, a typical port can be configured as an input or an output. Some systems allow the resistor pull ups and pull downs to be configured. A "pull-up resistor" is a resistor to the logic supply. A pull down is a resistor to ground. Logic suplies can be anyhing, but 3.3, and 5V are common with 1.8 V now showing up on the market.
So, the "port" can have a resistro to the "logic supply", thus forcing the port to a logic High. A switch, an opto isolator, whatever, can then be attached to the port and ground.
So, let's say you had a switch that closed when the turnstyle switch was in the quiesent position. When the turnstyle is moving, the "switch" opened. Thus, the port would be a logic high when stopped, and would go to a logic low while it is moving. This negative going edge can be detected with the API and the callback interrupt function.