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?
- All Categories
- 105 Announcements & News
- 55 Product News - New Product/Product Change Notice/ End-of-life
- 186 Welcome Developers!
- 55 Unboxing & Project Sharing
- 50 Tech Updates
- 693 UP Products
- 11 UP 7000
- 1 UP Squared i12
- 10 UP Xtreme i12
- 11 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 19 UP Squared V2
- 59 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 60 UP Squared Pro
- 143 UP Xtreme
- 837 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 216 Starter Kits & Peripheral