code: function servoLoop() {
      timer = setTimeout(servoLoop, 500);
  
      pwm.setPulseLength(steeringChannel, pulseLengths[nextPulse]);
      nextPulse = (nextPulse + 1) % pulseLengths.length;
  }
docs: loop to cycle through pulse lengths