[Lazarus] Where is hwiringPi?
donald at ziesig.org
Sun Sep 20 00:20:07 CEST 2015
On 09/18/2015 08:34 PM, Donald Ziesig wrote:
> On 09/18/2015 07:50 PM, Bo Berglund wrote:
>> On Sat, 19 Sep 2015 01:21:25 +0300, Maxim Ganetsky <ganmax at narod.ru>
>>> 19.09.2015 1:10, Donald Ziesig ?????:
>>>> Hi All!
>>>> It looks like this is Raspberry PI day :-) .
>>>> I have Lazarus working on a RPi 2 B with no problems til now.
>>>> (Started with monitor, keyboard and mouse till I got ssh and vnc
>>>> then switched to Remmina on my laptop via tcp/ip).
>>>> I need to access the GPIO pins from my Lazarus program. I have found
>>>> the C library "wiringPi" and many references to the FPC "hwiringPi"
>>>> package that wraps it, but I'll be darned if I can find "hwiringPi"
>>> Strange, that you couldn't find it. This site:
>>> is the first for the "hwiringPi" Google query.
>> Strangely I also need this for my RPi2 project!
>> The software needs to pull two relays as part ofthe automation. So
>> GPIO access is needed.
>> Now that it popped up may I inject a question here:
>> The hiwiringpi.pas file is an interface to something else written in C
>> if I understood the text correctly.
>> How does that work? It seems like I have to compile something in C on
>> the Pi as well and it produces an *.o file. Does that act like a dll
>> in Windows or like a lib file that gets linked into the final
>> I am not really (yet) familiar wth programming in Linux....
> There is a package written in C called wiringPi which is available on
> github. You will need to clone it and follow the instructions to
> build it. The hwiringPi package links to the wiringPi.o file in the
> wiringPi directory. As of right now, I am getting a linking error
> which seems to be rather common (there are many references to it
> online) because I am using the latest RPi version 2 B.
> Unfortunately my ISP has dropped my connection due to a thunderstorm
> so I am working on my cell phone (very slow). I think I'll wait until
> tomorrow to look any further.
> Don Z
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
I got it working8-) . It seems that the appropriate wrapper is
*h2wiringPi* (as opposed to *hwiringPi*). cloned that from github, set
the paths correctly, edited my uses clause and the program compiled,
linked and ran successfully.
Thanks all for pointing me in the right direction.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus