function setup() {
  createCanvas(640, 480);
  cam = createCapture(VIDEO, function() {
    streamReady = true;
  });
  cam.hide();
  noStroke();
}
simple timelapse camera, after each intervalTime a picture is saved.