code: public void programWithSketch(SketchHex hex, Callback<UploadProgress> onProgress, Runnable onComplete) {
  
          // Resetting client state means we have a clean state to start. Variables are cleared and
          // the state timeout timer will not fire during firmware uploads.
          resetSketchUploadState();
  
          // Set onProgress and onComplete handlers
          this.onSketchUploadProgress = onProgress;
          this.onSketchUploadComplete = onComplete;
  
          // Prepare the sketch blocks to be sent
          sketchBlocksToSend = Chunk.chunksFrom(hex, MAX_BLOCK_SIZE_BYTES);
  
          // Construct and send the START payload with sketch metadata
          SketchMetadata metadata = SketchMetadata.create(hex, new Date());
          Buffer payload = metadata.toPayload();
  
          // If there's no data in the hex sketch, send the empty metadata to clear the Bean's sketch
          // and don't worry about sending sketch blocks
          if (hex.bytes().length > 0) {
              sketchUploadState = SketchUploadState.SENDING_START_COMMAND;
              resetSketchStateTimeout();
          }
  
          sendMessage(BeanMessageID.BL_CMD_START, payload);
  
      }
docs: Programs the Bean with an Arduino sketch in hex form. The Bean's sketch name and
  programmed-at timestamp will be set from the
  {@link com.punchthrough.bean.sdk.upload.SketchHex} object.
  
  @param hex           The sketch to be sent to the Bean
  @param onProgress    Called with progress while the sketch upload is occurring
  @param onComplete    Called when the sketch upload is complete