code used to send necessary output from accelerometers over serial.