public void sendToCam(camDo cDo, char[] adition) {
        if (conn!=null) {
            if (cDo.equals(camDo.reset)) { 
                conn.send(new String(new char[] {0x56, 0, 0x26, 0})); //reset Cam
                gettingPhoto=false;
                jpegReading=false;
                stopTakingPicture=false;
            }
            if (cDo.equals(camDo.takeFoto)) { 
                if (!gettingPhoto) {
                    gettingPhoto=true;
                    conn.send(new String(new char[] {0x56, 0, 0x36, 0x01, 0})); //take photo
                }
            }
            if (cDo.equals(camDo.stopTakePhoto)) {
                conn.send(sOutStopTakePicture);
                gettingPhoto=false;
            }
            if (cDo.equals(camDo.compressRatio)) {
                conn.send(new String(new char[] {0x56, 0x00, 0x31, 0x05, 0x01, 0x01, 0x12, 0x04, 0xFF})); //change compress ratio
            }
            if (cDo.equals(camDo.setJpegSize)) {
                conn.send(new String(new char[] {0x56, 0x00, 0x54, 0x01, 0x11})); //change img size to 320x240
            }
            if (cDo.equals(camDo.readJpegSize)) {
                conn.send(new String(new char[] {0x56, 0x00, 0x34, 0x01, 0x00})); //read JPEG size
            }
            if (cDo.equals(camDo.jpegData)) {
                conn.send(new String(new char[] {0x56, 0x00, 0x32, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (char)XH, (char)XL, 0x00, 0x0A})); //read JPEG data
            }

            camDeath.startTick(timerDo.camNotResponse);
        }
        else {
            System.out.println("conn not defined");
        }
    }