Click here to Skip to main content
15,123,367 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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 ( could any one please help me how to use that library ?
Updated 26-May-15 20:12pm
I already explained to you how to use the underlying native library:

Why would you re-post the same thing in CLR variant? You could grasp the idea in first place, or ask some follow-up questions, or try to use P/Invoke on your own...

So, it's unclear what help you do you need...

Here is the deal: you can try to find solution by yourself and show some minimal code. If something doesn't work, I'll try to help you. I don't have Raspberry PI units, and not having it it's hard to write working code. But the WiringPI operation documentation looks quite clear to me.

[no name] 27-May-15 1:17am
Although SA has done his best why are you not on the R Pi forum for this question? That is always better than hoping someone on a general forum knows the answer.
Not quite. Now, I also found some very basic code sample using wiringPi directly; please see Solution 2.

1 solution

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:[^].

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.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900