mostly code for arduino project