joan2937 / pigpio

pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
The Unlicense
1.47k stars 410 forks source link

[Question when switch from wirinPi to pigpio]: How to #551

Closed hasenradball closed 1 year ago

hasenradball commented 1 year ago

Hi,

I wanted to rework some libraries which working actually on wiringPi or other GPIO libs to get working with pigpio. But I am not really familiar with where does the gpio support by the Libs come into account. Can you give me some hints where I have to do the changes when switching to pigpio?

guymcswain commented 1 year ago

You may receive better support on this question if you post it to the raspberrypi.org forums.

In short, my suggestion would be to write a set of C language wrapper functions that replace the wiring pi lib calls. Inside these functions you would resolve any impedance mismatch between the two libraries: parameter order and types, return values, etc.

That task will be time consuming and you may still need to restructure your original application code. Pigpio offers a daemon that can accept calls from higher level scriptung languages such as Python and JavaScript. It may be worth your time to explore rewriting your application if you are already familiar with one of the supported client languages.

guymcswain commented 1 year ago

Question answered.

hasenradball commented 1 year ago

Hi, sorry for the late response. A wrapper to use c library is no solution for me.

Thank you, i will ask this topic on the Pi forum.