code: function LCDAnimatedCharacter(lcd, memoryPosition, frames, frameRate, repeatCount) {
      if (!(this instanceof LCDAnimatedCharacter)) {
          return new LCDAnimatedCharacter(lcd, memoryPosition, frames, frameRate, repeatCount);
      }
      
      if (!(typeof memoryPosition === 'number') || memoryPosition < 0 || memoryPosition > 7) {
          throw new Error('The specified memory position is invalid (should be between 0 and 7).');
      }
      
      if (!Array.isArray(frames) || frames.length < 2) {
          throw new Error('The specified frames are invalid (should be an array containing at least two arrays, each containing eight 8-bit integers).');
      }
      
      if (!(typeof frameRate === 'number') || frameRate < 1) {
          throw new Error('The specified frame rate is invalid (should be greater or equal to 1).');
      }
      
      if (typeof repeatCount === 'number') {
          if (repeatCount < 0) {
              throw new Error('The specified repeat count is invalid (should be greater than or equal to 0).');
          }
      } else {
          repeatCount = 0;
      }
      
      this.lcd = lcd;
      
      this.memoryPosition = memoryPosition;
      this.frames = frames;   
      this.frameRate = frameRate;
      this.repeatCount = repeatCount;
      
      this.animationInterval = null;
      this.isAnimating = false;
      this.currentCycle = 0;
      this.currentFrame = 0;
      
      events.EventEmitter.call(this);
  }
docs: Creates a new `LCDAnimatedCharacter` object.
  Note: you should not instantiate this class directly. Instead, use the `createAnimatedCharacter` function of an initialized `LCD` object.
  @constructor
  @param {LCD} lcd The `LCD` instance.
  @param {Number} memoryPosition The Display-O-Tron memory position (should be between 0 and 7).
  @param {Array} frames An array containing at least two arrays, each containing eight 8-bit integers.
  @param {Number} frameRate The frame rate (frames per second).
  @param {Number} [repeatCount=0] The repeat count. 0 means infinite. Optional (0 by default).