added shuffle mode, and improve the methd for distinguish between arduino and a posix pc