Wiegand output library for 26 and 34 bits for arduino.
This library allow arduino hardware send a wiegand data using two arduino IO (Data0 and Data1) with 2 types of output - Wiegand 26 bits and Wiegand 34 bits standard.
Arduino Uno ESP32 ESP8266
- Include de library wiegandOutput.h
- Create a WiegandOut object: WiegandOut wiegandOut(8,9); -> Wiegand object initialized with Data0 at pin 8 and Data 1 at pin 9
- Use the method send to send your card number.
#include "Arduino.h"
#include "wiegandOutput.h"
WiegandOut wiegandOut(8,9);
//WiegandOut wiegandOut(8,9,true); -> it will enable the serial output with the binary wiegand data as ascii to debug;
long count = 0;
void setup() {
}
void loop(){
wiegandOut.send(count,26,true); // Send 26 bits with facility code
delay(1000);
wiegandOut.send(count,34,true); // Send 34 bits with facility code
delay(1000);
wiegandOut.send(count,26,false); // Send 26 bits without facility code
delay(1000);
wiegandOut.send(count,34,false); // Send 34 bits without facility code
delay(1000);
count++;
}