raspberry-sharp/raspberry-sharp-io

Parameter name Processor out of range in GetProcessorAddress

pmeloy opened this issue · 1 comments

Here's the calling code
var sdaPin = ConnectorPin.P1Pin03;
var sclPin = ConnectorPin.P1Pin05;
var driver = new I2cDriver(sdaPin.ToProcessor(), sclPin.ToProcessor());

Here's the trace from Mono.


System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: processor
  at Raspberry.IO.InterIntegratedCircuit.I2cDriver.GetProcessorBscAddress (Raspberry.Processor processor) [0x0001f] in <7205bdebbfc0476ebfe9c32a562a16ad>:0 
  at Raspberry.IO.InterIntegratedCircuit.I2cDriver.GetBscBase (Raspberry.IO.GeneralPurpose.ProcessorPin sdaPin, Raspberry.IO.GeneralPurpose.ProcessorPin sclPin) [0x0009c] in <7205bdebbfc0476ebfe9c32a562a16ad>:0 
  at Raspberry.IO.InterIntegratedCircuit.I2cDriver..ctor (Raspberry.IO.GeneralPurpose.ProcessorPin sdaPin, Raspberry.IO.GeneralPurpose.ProcessorPin sclPin) [0x00021] in <7205bdebbfc0476ebfe9c32a562a16ad>:0 
  at BMP180Test.Form1.Form1_Load (System.Object sender, System.EventArgs e) [0x00011] in <239d40aeefaf46f09352e86115174ce5>:0 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x0001f] in <6754339c6c96494e987941fc30b87946>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in <6754339c6c96494e987941fc30b87946>:0 

Ok, found out that this repository is behind what you get from Nuget. Using the Nuget references I can connect to devices on the I2C bus using sudo.