需要针对c#mono raspberry pi的Pin Interrupts库 [英] Need Pin Interrupts library for c# mono raspberry pi

查看:87
本文介绍了需要针对c#mono raspberry pi的Pin Interrupts库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,我们正在开发一个应用程序,它需要经常读取覆盆子pi板上的引脚状态(长轮询)是否有任何库(dll)支持引脚中断?即,如果引脚为高/低,它应该上升一个事件。我发现这个.net(https://github.com/danriches/WiringPi.Net)的库可以帮助我如何使用该库吗?

HI , we are developing an application which requires to read the status of pin on raspberry pi board frequently (long polling) is there any library (dll) supports pin interrupts ? ie., if the pin is HIGH / LOW it should rise an event. i found this library for .net (https://github.com/danriches/WiringPi.Net) could any one please help me how to use that library ?

推荐答案

除了我过去的答案,我解释了这个想法( Raspberry Pi Pin状态更改事件 [ ^ ]):



这是一篇非常好的文章,其代码示例使用 libwiringPi

http://java.dzone.com/articles/ control-led-raspberry-pi-2 [ ^ ]。



请注意,代码示例甚至不使用 libwiringPi CLR的包装器。相反,P / Invoke只是直接使用,以使用本机库代码。正如我在第一时间向你建议的那样。



这应该足以让你了解如何继续。您可以在我对上一个问题的回答中结合我的解释使用它。



-SA
In addition to my past answer where I explained the idea (Raspberry Pi Pin State change event[^]):

This is a very good article with code samples using libwiringPi:
http://java.dzone.com/articles/controlling-led-raspberry-pi-2[^].

Note that the code sample does not even use the libwiringPi wrapper for CLR. Instead, P/Invoke is just used directly, to use the native library code. Exactly as I suggested to you in first place.

This should be quite enough for you to understand how you can proceed. You can use it in combination with my explanations in my answer to your previous question.

—SA


这篇关于需要针对c#mono raspberry pi的Pin Interrupts库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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