Arduino thread protocol