带有DHT11传感器的Windows 10 IOT Core无法正常工作 [英] Windows 10 IOT Core with DHT11 sensor not working

查看:108
本文介绍了带有DHT11传感器的Windows 10 IOT Core无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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/


此致,


IoTGirl


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,

IoTGirl


这篇关于带有DHT11传感器的Windows 10 IOT Core无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆