2D Barcode Scanner Breakout SPX-16441 - not able to change the default timeout time

Hi,

I’m currently using this barcode scanner (https://www.sparkfun.com/products/16441) and I am using the Rx Tx pins to collect my data. Here is the setting manual doc :

Open Scan [Character Type Send]: :slight_smile: SCAN.

Close Scan [Character Type Sending]: :slight_smile: SLEEP.

Or send through hexadecimal instructions in the following format:

Command sending is 5E 5F 5E 53 43 414E 2E

Command sending is 5E 5F 5E 53 4C 45 50 2E

Note: Open scan default timeout time is 8S

Here is my code :

int scan()
{
    HWSERIAL.write("^_^SCAN.");
    delay(500);
    HWSERIAL.write("^_^SLEEP.");

    String RxNumber = ("");

    if (HWSERIAL.available())
    {
        while (HWSERIAL.available())
        {
            int x = HWSERIAL.read();
            RxNumber.concat((char)x);
        }
     }
}

I tried to make it scan only during the 500 delay, but it still stays on for 8 seconds.

Can I change the scan default time and how?

Let me know if you have hints on how to do this!

Thank you,

Hi,

I finally figured it out. The Scan and Sleep commands work and I think it was only a programming bug or uploading bug.

Thank you.