There are two scripts one for PINs with 4 or 5 digits and one for PINs with 6 to 8 digits. The scripts are made for the ATTiny85 however the logic can be applied to any HID (Human Interface Device) ...