anchor.diff:      return _serialPort.write([DIGITAL_MESSAGE | portNumber, _digitalOutputData[portNumber] & 0x7F, _digitalOutputData[portNumber] >> 7]);
     }
   
  -  /// Asks the arduino to read the value of digital pin
  -  //Future<int> digitalRead(int pin) => new Future.value((_digitalInputData[pin>>3] >> (pin & 0x07)) & 0x01);
  +  /// Stream that sent FirmataVersion
  +  Stream<PinState> get onDigitalRead => _digitalReadController.stream;
  +
  +  // Read the digatal value from pin;
  +  //int digitalRead(int pin) => _digitalOutputData[pin];
   
     /// Asks the arduino to write an analog message.
     Future<bool> analogWrite(int pin, int value) {
  
positive.code:     return _serialPort.write([ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >> 7]);
    }
  
    /// Resquest a QUERY_FIRMWARE call
    Future<bool> queryFirmware() => _serialPort.write([START_SYSEX, QUERY_FIRMWARE, END_SYSEX]);
  
    /// Asks the arduino to tell us the current state of a pin
    //Future<bool> queryPinState(int pin) => _serialPort.write(([START_SYSEX, PIN_STATE_QUERY, pin, END_SYSEX]));
  
    /// Request a CAPABILITY_RESPONSE call
    Future<bool> queryCapability() => _serialPort.write([START_SYSEX, CAPABILITY_QUERY, END_SYSEX]);
  
    /// Asks the arduino to tell us its analog pin mapping
    Future<bool> queryAnalogMapping() => _serialPort.write([START_SYSEX, ANALOG_MAPPING_QUERY, END_SYSEX]);
  
    /// Close the connection
    Future<bool> close() => _serialPort.close();
  
    /// Stream that sent FirmataVersion
    Stream<PinState> get onDigitalRead => _digitalReadController.stream;
  
  }
  
  
negative.code:     _serialPort.write([PIN_MODE, pin, mode]);
    }
  
    /// Resquest a QUERY_FIRMWARE call
    Future<bool> queryFirmware() => _serialPort.write([START_SYSEX, QUERY_FIRMWARE, END_SYSEX]);
  
    /// Asks the arduino to tell us the current state of a pin
    //Future<bool> queryPinState(int pin) => _serialPort.write(([START_SYSEX, PIN_STATE_QUERY, pin, END_SYSEX]));
  
    /// Request a CAPABILITY_RESPONSE call
    Future<bool> queryCapability() => _serialPort.write([START_SYSEX, CAPABILITY_QUERY, END_SYSEX]);
  
    /// Asks the arduino to tell us its analog pin mapping
    Future<bool> queryAnalogMapping() => _serialPort.write([START_SYSEX, ANALOG_MAPPING_QUERY, END_SYSEX]);
  
    /// Close the connection
    Future<bool> close() => _serialPort.close();
  
    /// Asks the arduino to write a value to a digital pin
    Future<bool> digitalWrite(int pin, int value) {
      final portNumber = (pin >> 3) & 0x0F;
  