带有DHT11传感器的Windows 10 IOT Core无法正常工作 [英] Windows 10 IOT Core with DHT11 sensor not working
问题描述
我正在使用Windows 10 IOT尝试此示例 https://create.arduino.cc/projecthub/porrey/dht11-dht22-temperature-sensor-077790
Core和Raspberry Pi 3.我没有得到任何阅读。我怎么弄清楚出了什么问题。
请找到我与Pi连接的图像
以下是初始化代码
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
GpioController controller = GpioController.GetDefault();
if(controller!= null)
{
_pin = GpioController.GetDefault()。OpenPin(4,GpioSharingMode.Exclusive);
_dht = new Dht11(_pin,GpioPinDriveMode.Input);
_timer.Start();
_startedAt = DateTimeOffset.Now;
}
}
您好Nitin,
您是否查看过用于IoTCore的样品? 例如
http://www.c -sharpcorner.com/article/windows-10-iot-monitor-temperature-humidity-using-dht11/
此致,
I am trying this sample https://create.arduino.cc/projecthub/porrey/dht11-dht22-temperature-sensor-077790
with Windows 10 IOT Core and Raspberry Pi 3. I am not getting any reading. How do i figure out what is wrong.
Please find my image of connectivity with Pi
Below is the code of initialization
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); GpioController controller = GpioController.GetDefault(); if (controller != null) { _pin = GpioController.GetDefault().OpenPin(4, GpioSharingMode.Exclusive); _dht = new Dht11(_pin, GpioPinDriveMode.Input); _timer.Start(); _startedAt = DateTimeOffset.Now; } }
Hi Nitin,
Have you looked at samples intended for IoTCore? For example http://www.c-sharpcorner.com/article/windows-10-iot-monitor-temperature-humidity-using-dht11/
Sincerely,
这篇关于带有DHT11传感器的Windows 10 IOT Core无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!