added serial read with timeout in arduino