capacative vs optical fingerprint sensor
If you used the EXACT same code as is posted in the link you provided (without any modifications), your issue may be corrected by commenting line 28 and uncommenting lines 35 and 36. It should look something like this...
.
.
.
#include &lt;Adafruit_Fingerprint.h&gt;  
  
  
// On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white  
// uncomment this line:  
//#define mySerial Serial1  
  
  
// For UNO and others without hardware serial, we must use software serial...  
// pin #2 is IN from sensor (GREEN wire)  
// pin #3 is OUT from arduino  (WHITE wire)  
// comment these two lines if using hardware serial  
#include &lt;SoftwareSerial.h&gt;  
SoftwareSerial mySerial(2, 3);  
.
.
. 

Best of luck!