wrote a bluetooth transmit function