diff --git a/WaveshareUARTFingerprintSensor/FingerprintSensor.cs b/WaveshareUARTFingerprintSensor/FingerprintSensor.cs
index 727ae5d..0aabb86 100644
--- a/WaveshareUARTFingerprintSensor/FingerprintSensor.cs
+++ b/WaveshareUARTFingerprintSensor/FingerprintSensor.cs
@@ -332,6 +332,45 @@ namespace WaveshareUARTFingerprintSensor
return false;
}
+
+ ///
+ /// Read a fingerprint and check if it matches with the specified user
+ ///
+ /// A registered user ID
+ ///
+ public bool Comparison11(ushort userID)
+ {
+ (byte high, byte low) = Utils.Split(userID);
+
+ if (TrySendAndReceive(CommandType.Comparison11, high, low, 0, out var response, 1000))
+ {
+ return response.responseType == ResponseType.Success;
+ }
+
+ return false;
+ }
+
+ ///
+ /// Read a fingerprint and check if it match with any registered user
+ ///
+ /// The matched user info
+ ///
+ public bool TryComparison1N(out (ushort userID, UserPermission permission) userInfo)
+ {
+ if (TrySendAndReceive(CommandType.Comparison11, 0, 0, 0, out var response, 1000))
+ {
+ if (response.responseType != ResponseType.NoUser && response.responseType != ResponseType.Timeout)
+ {
+ userInfo = (Utils.Merge(response.first, response.second), (UserPermission)response.responseType);
+
+ return true;
+ }
+ }
+
+ userInfo = default;
+
+ return false;
+ }
private void OnWake()
{
if (_wakePin.Read())