Wait for ACK to resend

Changed structure to wait for ack before sending new messages. dropping all messages until then.
Added translation of byte array back to int16_t in Java side. (thanks to Katharine)