Processing Camera while (!cam.available()) question

edited February 2017 in Library Questions

hi all, I've got a basic file to simply start the camera on Processing, I've made a gist here:

and these line of code confusing me a bit:

while(!cam.available()) { print(); // needed }

I'm aware this is for the preparation work while to wait for the cameras to be available, the questions I have is:

  1. why is print() needed else the camera won't appear in the code.
  2. can I re-write this in an async form? Not liking the code where nothing happens while we just wait..


Sign In or Register to comment.