I found that you posted this program for SPI communication:
var adcClock = ConnectorPin.P1Pin23.ToProcessor();
var adcMiso = ConnectorPin.P1Pin21.ToProcessor();
var adcMosi = ConnectorPin.P1Pin19.ToProcessor();
var adcCs = ConnectorPin.P1Pin22.ToProcessor();
var spiConnection = new Raspberry.IO.SerialPeripheralInterface.SpiConnection(adcClock, adcCs, adcMiso, adcMosi, 0 /*Endianness.LittleEndian*/);
using(spiConnection.SelectSlave())
{
// Start bit
spiConnection.Write(true);
// Channel is single-ended
spiConnection.Write(true);
// Channel Id
spiConnection.Write((byte)2, 3);
// Let one clock to sample
spiConnection.Synchronize();
while (true)
{
// Read 8 bits
for (int i = 0; i < 8; i++)
{
var data = spiConnection.Read(8);
Console.Write( data.ToString("X2") + " ");
}
Console.WriteLine("");
}
}
But it gives me those errors:
Line 9, Column 21 (Code):
The best overloaded method match for `Raspberry.IO.SerialPeripheralInterface.SpiConnection.SpiConnection(Raspberry.IO.IOutputBinaryPin, Raspberry.IO.IOutputBinaryPin, Raspberry.IO.IInputBinaryPin, Raspberry.IO.IOutputBinaryPin, Raspberry.IO.SerialPeripheralInterface.Endianness)' has some invalid arguments
/usr/local/bin/homegenie/Raspberry.IO.SerialPeripheralInterface.dll (Location of the symbol related to previous error)
Line 9, Column 78 (Code):
Argument `#1' cannot convert `Raspberry.IO.GeneralPurpose.ProcessorPin' expression to type `Raspberry.IO.IOutputBinaryPin'