.on("ready", function(bot) {
    bot.camera.on("cameraReady", function() {
      console.log("the camera is ready!");

      bot.camera.on("frameReady", function(err, im) {