code: function Led(board, pin, driveMode) {
      Module.call(this);
  
      this._board = board;
      this._pin = pin;
      this._driveMode = driveMode || Led.SOURCE_DRIVE;
      this._supportsPWM = undefined;
      this._blinkTimer = null;
  
      this._board.on(BoardEvent.BEFOREDISCONNECT, this._clearBlinkTimer.bind(this));
      this._board.on(BoardEvent.ERROR, this._clearBlinkTimer.bind(this));
  
      if (this._driveMode === Led.SOURCE_DRIVE) {
        this._onValue = 1;
        this._offValue = 0;
      } else if (this._driveMode === Led.SYNC_DRIVE) {
        this._onValue = 0;
        this._offValue = 1;
      } else {
        throw new Error('driveMode should be Led.SOURCE_DRIVE or Led.SYNC_DRIVE');
      }
  
      if (pin.capabilities[Pin.PWM]) {
        board.setDigitalPinMode(pin.number, Pin.PWM);
        this._supportsPWM = true;
      } else {
        board.setDigitalPinMode(pin.number, Pin.DOUT);
        this._supportsPWM = false;
      }
    }
docs: The Led class.
  
  @namespace webduino.module
  @class Led
  @constructor
  @param {webduino.Board} board The board the LED is attached to.
  @param {webduino.Pin} pin The pin the LED is connected to.
  @param {Number} [driveMode] Drive mode the LED is operating at, either Led.SOURCE_DRIVE or Led.SYNC_DRIVE.
  @extends webduino.Module