code: function() {
      var fn = "void loop()\n";
      fn += "{\n";
  
      fn += this.transport.createLoopBeginBlock();
  
      if (digitalInputEnabled) {
        fn += "  digitalInput.report();\n\n";
      }
  
      fn += "  while(Firmata.available()) {\n";
      fn += "    Firmata.processInput();\n";
  
      if (schedulerEnabled) {
        fn += "    if (!Firmata.isParsingMessage()) {\n";
        fn += "      goto runtasks;\n";
        fn += "    }\n";
        fn += "  }\n"; // end while (if scheduler)
        fn += "  if (!Firmata.isParsingMessage()) {\n";
        fn += "runtasks: scheduler.runTasks();\n";
      }
  
      // if scheduler end if, else end while
      fn += "  }\n\n";
  
      if (this.reportingEnabled) {
        var numReporting = this.featuresWithReporting.length;
        fn += "  if (reporting.elapsed()) {\n";
        for (var i = 0; i < numReporting; i++) {
          fn += ("    " + this.featuresWithReporting[i].instanceName + ".report();\n");
        }
        fn += "  }\n";
      }
  
      if (this.updateEnabled) {
        var numUpdate = this.featuresWithUpdate.length;
        fn += "\n";
        for (var k = 0; k < numUpdate; k++) {
          fn += ("  " + this.featuresWithUpdate[k].instanceName + ".update();\n");
        }
      }
  
      fn += this.transport.createLoopEndBlock();
  
      fn += "}\n";
      return fn;
    }
docs: Creates the Arduino loop() function.
  @private