Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: [partially OT] - wiringPi deprecated

by stevieb (Canon)
on Sep 17, 2019 at 13:29 UTC ( #11106299=note: print w/replies, xml ) Need Help??


in reply to [partially OT] - wiringPi deprecated

My RPi::WiringPi is based off of this, as are a few of my near two-dozen supporting RPi:: distributions for sensors, communication protocols (serial, I2C etc) and other peripheral devices on my CPAN. With that said, over the past couple of years, I've weaned away from the wiringPi library in several of the distros, instead re-writing the code in them with custom replacement C/C++.

It's unlikely wiringPi is going to just up and die. Although I'm not aware of a single coordinated effort to keep it going, there are definitely other mirror repositories out there and people are continuing to move the software forward.

I really hope that wiringPi doesn't completely go dark (I can't see it honestly), but if it does, I've been working on ideas to ensure that RPi::WiringPi (and its base, WiringPi::API) will continue on.

Note that there's currently RPi::PIGPIO, that uses the pigpio library (which is not related to wiringPi), and hence, is not affected by the deprication as far as I can tell. I've never used this software myself, and haven't had a look at the source since it was really first released.

I've also recently contacted Gordon about getting access to his most recent revision of his git repo before he took it offline.

Replies are listed 'Best First'.
Re^2: [partially OT] - wiringPi deprecated
by jmlynesjr (Chaplain) on Jun 07, 2020 at 21:10 UTC

    Is there any update on this topic?

    I have an installation of RPi::WiringPi that works fine on an RPi 3B+, but was wondering if there is a version known to work with an RPi 4B. I am working on a Perl si5351(programmable RF oscillator chip) driver for the Adafruit si5351 break out board. I would like to be able to move to the RPi 4 in the future.

    I found a post from steveb(no relation to our stevieb,that developed RPi::WiringPi) who works with the Zynthian Open Synth Platform project that has built a WiringPi 2.60 http://github.com/steveb/WiringPi/tree/master. Any idea if this works with RPi::WiringPi on a RPi 4?

    Thanks

    James

    There's never enough time to do it right, but always enough time to do it over...

      Sort of related, HiPi has had recent updates to cater for the various v4 models.

        Marto

        Thank you for the links. I will check it out. I know Mark from his work on wxPerl.

        My current code is several single function scripts to test concepts. I will ultimately be interfacing some custom hardware to the Quisk Software Defined Radio(SDR) package via a localhost socket. The Perl TCP/IP support made this interface really simple. At this point porting to a different language/library wouldn't be too bad, but I really don't want to learn Python.

        Update: It looks like HiPi will do the trick. I got it loaded today on a RPi 3B+ and ported two of my test scripts over. They both ran fine.

        HiPi was updated this month to support the new RPi 4B 8GB board. Raspbian 64bit is in beta.

        #! /usr/bin/perl # # hipiiotest.pl - Test PB, Encoder, and LED Wiring - Uses Perl HiPi D +istribution # by Mark Dootson # # James M. Lynes Jr. - KE4MIQ # Created: October 18,2019 - Initial test version using RPi::Wir +ingPi # by Steve Bertran # Last Modified: 06/09/2020 - First version using HiPi # 06/12/2020 - Merge changes tested in hipiblink.pl # Target: Raspberry Pi 3B+ and 4B in the future # # Notes: Pin numbers below refer to the GPIO## numbers # ex: 4 -> GPIO4 17 -> GPIO17 # # RPI J8 - GPIO Pin Definitions # ----------------------------- # 3V3 (1) (2) 5V # SDA/GPIO2 (3) (4) 5V # SCL/GPIO3 (5) (6) GND # PB1/GPIO4 (7) (8) GPIO14 # GND (9) (10) GPIO15 # PB2/GPIO17 (11) (12) GPIO18 # ENCA/GPIO27 (13) (14) GND # ENCB/GPIO22 (15) (16) GPIO23 # 3V3 (17) (18) GPIO24 # RED/GPIO10 (19) (20) GND # YEL/ GPIO9 (21) (22) GPIO25 # GRN/GPIO11 (23) (24) GPIO8 # GND (25) (26) GPIO7 # GPIO0 (27) (28) GPIO1 # GPIO5 (29) (30) GND # GPIO6 (31) (32) GPIO12 # GPIO13 (33) (34) GND # GPIO19 (35) (36) GPIO16 # GPIO26 (37) (38) GPIO20 # GND (39) (40) GPIO21 use strict; use warnings; use HiPi qw( :rpi ); use HiPi::GPIO; use Time::HiRes qw(sleep); my $gpio = HiPi::GPIO->new; # Create a GPIO Object # Create two push button inputs my $pb1 = $gpio->get_pin(4); # Create pin object for pb1 $pb1->mode(RPI_MODE_INPUT); # Set pin to input $pb1->set_pud(RPI_PUD_UP); # Turn on internal pull-up resi +stor my $pb2 = $gpio->get_pin(17); # Create pin object for pb2 $pb2->mode(RPI_MODE_INPUT); # Set pin to input $pb2->set_pud(RPI_PUD_UP); # Turn on internal pull-up resi +stor # Create two encoder inputs my $enca = $gpio->get_pin(27); # Create pin object for ENCA $enca->mode(RPI_MODE_INPUT); # Set pin to input $enca->set_pud(RPI_PUD_UP); # Turn on internal pull-up resi +stor my $encb = $gpio->get_pin(22); # Create pin object for ENCB $encb->mode(RPI_MODE_INPUT); # Set pin to input $encb->set_pud(RPI_PUD_UP); # Turn on internal pull-up resi +stor # Create three LED outputs my $led1 = $gpio->get_pin(10); # Red $led1->mode(RPI_MODE_OUTPUT); $led1->value(RPI_HIGH); my $led2 = $gpio->get_pin(9); # Yellow $led2->mode(RPI_MODE_OUTPUT); $led2->value(RPI_HIGH); my $led3 = $gpio->get_pin(11); # Green $led3->mode(RPI_MODE_OUTPUT); $led3->value(RPI_HIGH); sleep(2); # Leave LEDs on for two seconds $led1->value(RPI_LOW); # Turn the LEDs back off $led2->value(RPI_LOW); $led3->value(RPI_LOW); while(1) { my $pb1v = $pb1->value; # Read the four input values my $pb2v = $pb2->value; my $encav = $enca->value; my $encbv = $encb->value; $led1->value($encav); # Echo encoder bits to leds $led2->value($encbv); print "PB1: $pb1v\n"; # Print the current values print "PB2: $pb2v\n"; print "ENCA: $encav\n"; print "ENCB: $encbv\n\n"; sleep(.1); # Delay 100ms }

        James

        There's never enough time to do it right, but always enough time to do it over...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11106299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2021-03-04 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (107 votes). Check out past polls.

    Notices?