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]: SCAN.
Close Scan [Character Type Sending]: 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,