How to access I2c and GPIO on Windows IoT
The following code will open up the I2c without issue on the Raspberry Pi, but on Up Squared it results in an exception.
string advancedQuerySyntaxString = I2cDevice.GetDeviceSelector("I2C1"); var deviceInformationCollection = await DeviceInformation.FindAllAsync(advancedQuerySyntaxString); _device = await I2cDevice.FromIdAsync(deviceInformationCollection.Id, settings);
It seems to not find any I2c, and thus "deviceInformationCollection" is empty.
It throws the following exception:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at System.Runtime.InteropServices.WindowsRuntime.IVectorViewToIReadOnlyListAdapter.Indexer_Get[T](Int32 index)
How should the BIOS be configured to get I2c and GPIO working in Windows IoT?
Are there any additional changes that must be done elsewhere?