How to compare gathered barcode with determined code

johnwasser:
Looks like it displays the key presses as they arrive but doesn't store them anywhere:

    key= char(schluessel);

lcd.print( key );
    Serial.print(key);




I think you will need to store the characters in a buffer. Is there some marker that indicates the end of input from the scanner? If not, you may need a timeout to detect when the input is complete. Then you can compare the buffer against the desired data.

Hi John, I am currently facing same issue with the OP. Appreciate your help to instruct me how to store the arrives data into buffer then compare with desired data. Thanks in advance!!!