我正在尝试在我的树莓派3和Windows10 IoT上使用MPU6050型(GY-521型)传感器。我在Hackster上关注了this example,但是下面这行
DeviceInformationCollection collection = await DeviceInformation.FindAllAsync(aqs);返回一个空集合。我正在使用Microsoft Lightning provider。
这是通过I2cDevice.GetDeviceSelector()获取的aqs字符串值:
System.Devices.InterfaceClassGuid:="{A11EE3C6-8421-4202-A3E7-B91FF90188E4}" AND System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True发布于 2019-09-09 14:11:28
DMAP和收件箱驱动程序是互斥的。当通过device portal.So启用DMAP驱动程序时,默认(收件箱) I2C以及SPI和GPIO驱动程序将被禁用,您的post中的上述代码将不起作用。请改用以下代码。
if (LightningProvider.IsLightningEnabled)
{
LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
}
I2cController controller = await I2cController.GetDefaultAsync();https://stackoverflow.com/questions/57826154
复制相似问题