public void write(final int data) throws BITalinoException {
        try {
            os.write(data);
            os.flush();
            Thread.sleep(1000);
        } catch (Exception e) {
            e.printStackTrace(System.err);
            throw new BITalinoException(BITalinoErrorTypes.LOST_COMMUNICATION);
        }
    }