added flag for arduino connection