# Reading Wiegand Card Data with Automation HAT

**URL:** <https://forums.pimoroni.com/t/reading-wiegand-card-data-with-automation-hat/28653>\
**Category:** Support\
**Created:** [January 30, 2026, 10:52pm UTC](https://forums.pimoroni.com/t/reading-wiegand-card-data-with-automation-hat/28653 "2026-01-30T22:52:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcm4181](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rcm4181](https://forums.pimoroni.com/u/rcm4181)\
**Post date:** [January 30, 2026, 10:52pm UTC](https://forums.pimoroni.com/t/reading-wiegand-card-data-with-automation-hat/28653/1 "2026-01-30T22:52:55Z")

</div>

Greetings:

For my project, I need to read data from a HID ProxPro II proximity terminal. This device uses a Wiegand data interface and not serial. The reader uses four wires (5V, ground, Data0 and Data1). I am trying to reproduce the same configuration as described in the project below:

> **[Decoding the Wiegand protocol | AccessGrid](https://accessgrid.com/guides/access-control-protocols/decoding-the-wiegand-protocol)**
>
> AccessGrid provides APIs for managing NFC access passes on mobile devices with MIFARE DESFire compatibility. Create and manage secure digital access credentials for your organization.

The above project uses GPIO27 and GPIO17 for the green and white data connections. Additionally, since the Wiegand data lines idle HIGH, they are using pull-up resistors to insure signal integrity.

The sample Python program provided will read and decode card data. It utilizes RPi.GPIO and uses event-driven callbacks rather than continuously polling for signal changes with a loop.

Attempting to reproduce this, my setup is shown in the photo below.

**Questions** :

1. Can this be accomplished without the use of resistors and a breadboard, wiring directly to the automation HAT?
2. Does the automation HAT board support the equivalent GPIO **setup** and **add\_event\_detect** methods?
3. Should I be using the analog terminals or the input terminals for my data connections?

 ![HID](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/b/bdd42c6a05d96dedbbc587305508df46bc9f86bc.jpeg)

I found this post from 2018 related to event-based detection, but it didn’t provide a clear answer:

> <https://github.com/pimoroni/automation-hat/issues/21>
>
> Hi,
> 
> I have an automationHAT sitting on an RPi3 that's doing a bunch of stuff …with relays. I need to hook a doorbell into the system and sense the button presses. I wired the positive lead to 5V and plugged the other side into the buffered input with the pull-down resistor turned on via:
> 
> \`GPIO.setup(21, GPIO.IN, pull\_up\_down=GPIO.PUD\_DOWN)\`. 
> 
> Right now I have a loop running in a thread to check the input state every .05 seconds. It works but I'd like to move to:
> 
> \`GPIO.add\_event\_detect(21, GPIO.RISING, callback=myCallback)\` 
> 
> but the code never gets the rising event. Is the use of the rising event supported when using a PIN connected to the buffered input? If not, do you have another way that would be better than polling? The CPU is also doing a bunch of transcoding work for other automations so I'm eager to not tax the CPU with the loop.
> 
> Thanks!

Thank you for any assistance!
