samulio
Posts: 3
Joined: Sun Sep 20, 2020 5:59 pm

Any alternative library of WiringPi in C++

Fri Oct 02, 2020 12:06 pm

I am working with pi 4 B Module. When I go to use Wiring pi I see a shocking news that was WiringPi is deprecated. What can I do now. Please help me

User avatar
B.Goode
Posts: 10725
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Any alternative library of WiringPi in C++

Fri Oct 02, 2020 12:10 pm

samulio wrote:
Fri Oct 02, 2020 12:06 pm
I am working with pi 4 B Module. When I go to use Wiring pi I see a shocking news that was WiringPi is deprecated. What can I do now. Please help me


viewtopic.php?f=66&t=287021&p=1735019#p1735019

User avatar
jahboater
Posts: 6265
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 9:10 am

This one is well written, well supported, and fast:
http://abyz.me.uk/rpi/pigpio/
Pi4 8GB running PIOS64 Lite

dsyleixa123
Posts: 1022
Joined: Mon Jun 11, 2018 11:22 am

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 9:21 am

jahboater wrote:
Sat Oct 03, 2020 9:10 am
This one is well written, well supported, and fast:
http://abyz.me.uk/rpi/pigpio/
but that lib is not easily understandable and usable in the sense of Wiring/Arduino C/C++ beginner- und layman--friendlyness, and multiple example codes for either function are hard to find.
Wishful (but also not officially available for wiringPi) would be a lib publication like the Arduino and espressif communities do, on github, providing a hierarchically structured repo with source codes and multiple examples in dedicated example subdirs, e.g.
https://github.com/arduino-libraries
https://github.com/espressif/arduino-es ... /libraries

Heater
Posts: 16826
Joined: Tue Jul 17, 2012 3:02 pm

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 9:39 am

samulio wrote:
Fri Oct 02, 2020 12:06 pm
I see a shocking news that was WiringPi is deprecated.
Who says?

"deprecate" means:

"to not approve of something or say that you do not approve of something"

Anyway, WiringPi is still very much alive and well, supported by those who do not disapprove of it: https://github.com/WiringPi/WiringPi

A statement here recently by WiringPi's original creator hinted that he may get back to supporting it in the future if circumstances permit.
Memory in C++ is a leaky abstraction .

User avatar
B.Goode
Posts: 10725
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 9:48 am

Heater wrote:
Sat Oct 03, 2020 9:39 am
samulio wrote:
Fri Oct 02, 2020 12:06 pm
I see a shocking news that was WiringPi is deprecated.
Who says?


Its developer/maintainer, apparently, unless you think this 12-month old bog post is somehow a spoof -

http://wiringpi.com/wiringpi-deprecated/



(Although the fact that the announcement is a year old means it should not be considered 'shocking... ' )

Heater
Posts: 16826
Joined: Tue Jul 17, 2012 3:02 pm

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 10:03 am

B.Goode wrote:
Sat Oct 03, 2020 9:48 am
Its developer/maintainer, apparently, unless you think this 12-month old bog post is somehow a spoof -
http://wiringpi.com/wiringpi-deprecated/
Yes. I know. I read that a year ago. I totally sympathize with the maintainer's problems there.

But this is Free and/or Open Source software we are talking about. It is expected that it can live on without support of the original creator. That is largely the whole point of it.

I conclude that whilst the maintainer (and others) may regard the versions he created and released as "deprecated", there is no reason the software should be regarded as such. Especially if others are carrying on maintenance and development of it.

Classic examples of this are MySql, which many would deprecate today, but it lives on very successfully as MariaDB. Or what about Java?
B.Goode wrote:
Sat Oct 03, 2020 9:48 am
(Although the fact that the announcement is a year old means it should not be considered 'shocking... ' )
Yes, it's a bit late to be shocked.
Memory in C++ is a leaky abstraction .

User avatar
jahboater
Posts: 6265
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 10:45 am

dsyleixa123 wrote:
Sat Oct 03, 2020 9:21 am
and multiple example codes for either function are hard to find.
The examples are here:
http://abyz.me.uk/rpi/pigpio/examples.html

This is for the Raspberry Pi by the way, not the Arduino.
Pi4 8GB running PIOS64 Lite

dsyleixa123
Posts: 1022
Joined: Mon Jun 11, 2018 11:22 am

Re: Any alternative library of WiringPi in C++

Sat Oct 03, 2020 11:56 am

jahboater wrote:
Sat Oct 03, 2020 10:45 am
dsyleixa123 wrote:
Sat Oct 03, 2020 9:21 am
and multiple example codes for either function are hard to find.
The examples are here:
http://abyz.me.uk/rpi/pigpio/examples.html

This is for the Raspberry Pi by the way, not the Arduino.
of course it's for the Pi, WiringPi is also for the Pi, as it uses (partially) the Wiring=Arduino ideas.
OTOH, e.g. looking at rotary encoder pigpio files
http://abyz.me.uk/rpi/pigpio/code/rotary_encoder_c.zip
http://abyz.me.uk/rpi/pigpio/code/RED.zip
the examples are hardly understandable (not to say: confusing) for a hobby user, it's looking rather obfuscated.
Also code for more devices with convenient API functions would be wishful ( e.g., ads1115, mcp23011, pcf8574, CMPS12, mpu6050(dmp), mpu9250(dmp), bmp280, GPS Neo-6M, UART-communication from Raspi to Raspi or Arduino), providing tutorial-overviews and extensively commented source code also for teaching purposes

As to the library-APIs, the Wiring=Arduino philosophy for beginner-friendlyness also for Pi-users is the crucial idea.
The objective of the thesis was to make it easy for artists and designers to work with electronics, by abstracting away the often complicated details of electronics so they can focus on their own objectives.
https://arduinohistory.github.io/
http://people.interactionivrea.org/h.ba ... ow_res.pdf

As to the TOP, I still use WiringPi and IIRC it's finally still part of the Raspi OS distros (Stretch + Buster, apt-package).

kenblu24
Posts: 4
Joined: Sun Oct 04, 2020 7:42 am

Re: Any alternative library of WiringPi in C++

Tue Oct 06, 2020 1:25 am

But this is Free and/or Open Source software we are talking about. It is expected that it can live on without support of the original creator. That is largely the whole point of it.

I conclude that whilst the maintainer (and others) may regard the versions he created and released as "deprecated", there is no reason the software should be regarded as such. Especially if others are carrying on maintenance and development of it.
That implies that it is actively being worked on. The unofficial wPi mirror says in the readme:
Pull-requests may be accepted to add or fix support for newer hardware, but new features or other changes will not be accepted.
It's basically on end-of-life support, and barely even that, as there's no actual compiled release.

Heater
Posts: 16826
Joined: Tue Jul 17, 2012 3:02 pm

Re: Any alternative library of WiringPi in C++

Tue Oct 06, 2020 1:42 am

kenblu24 wrote:
Tue Oct 06, 2020 1:25 am
It's basically on end-of-life support, and barely even that, as there's no actual compiled release.
I don't know what you mean by that.

"end-of-life" in the software world generally refers to closed source, proprietary, copyrighted software who producer has announced they are no longer developing or supplying it and will cease all support soon. After which there is no way to keep it alive as the source is not available and licensing prevents it. Think old versions of Windows etc.

As I said, this is open source software we are talking about. As long as there is even one person fixing bugs as they are found and adapting to new hardware, and one person using it then it is as alive as the day it was created.

I don't see that "new features or other changes" is required for it to be said that the code is still alive.

And as this is open source software, a library to be built into other peoples code, then compiled releases are not required for it to be alive and useful.
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1022
Joined: Mon Jun 11, 2018 11:22 am

Re: Any alternative library of WiringPi in C++

Tue Oct 06, 2020 7:42 am

not to forget:
there is already a fork supporting the Pi 4, thanks to Milliways:

viewtopic.php?p=1730729#p1730729

it just has to be maintained for further updates, upgrades, and extensions.
Perhaps by DougieLawson?
viewtopic.php?p=1725904#p1725904

Return to “C/C++”