[Lazarus] Where is hwiringPi?

Donald Ziesig donald at ziesig.org
Sat Sep 19 02:34:37 CEST 2015


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>
> wrote:
>
>> 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 setup,
>>> 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" itself.
>> Strange, that you couldn't find it. This site:
>>
>> https://github.com/AkselMeola/Pascal-projects-on-Raspberry/tree/master/Morse-code-translator
>> \
>> 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
> executable?
>
> 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





More information about the Lazarus mailing list