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?
- 258 All Categories
- 102 Announcements & News
- 33 Product News - New Product/Product Change Notice/ End-of-life
- 173 Welcome Developers!
- 46 Unboxing & Project Sharing
- 14 Tech Updates
- 145 UP Products
- 3 UP Squared Pro
- 95 UP Xtreme
- 739 UP Squared
- 1.3K UP Board
- 79 UP Core Plus
- 205 UP Core
- UP Xtreme Lite
- 34 UP AI Edge
- 206 Starter Kits & Peripheral