Declaring analog pins as digital and setting up with a loop

If you're using that shield on a Mega, A4 and A5 don't carry the I2C signals and the I2C connector marked I2C Interface will not carry the I2C signals. So A4/A5 for the Wiegand should not pose an issue.

The I2C interface is available on pins 20/21 of the Mega