Arduino beginner here! I'm working on my first project where I'm trying to get a Wiegand card-reader to communicate via MQTT. My setup is a RK40 reader and an Wemos D1 Mini board. I'm using the PubSub library for MQTT communication and the Wiegand-protocol-library for getting data from the reader.
I got the reader to publish both card-data and key-presses and everything was working fine. I than wanted to add feedback that made the LED turn green if the door is unlocked, and made the alarm go off if something went wrong. Subscribing to the feedback worked fine as well.
My problem is that when declaring two pins for output, one for the green led and one for the alarm. The data containing the key-presses got corrupted. Instead of sending a 1 it sends 14 and instead of sending a 4 it sends 12 and all other numbers seems to be mapped incorrectly as well.
Has anyone else had a similar problem where the pins seems to interfere with each other? Any help is appreciated ![]()