Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Contemplating a documentation series for my Raspberry Pi work

by zentara (Archbishop)
on Jul 04, 2017 at 12:33 UTC ( [id://1194145]=note: print w/replies, xml ) Need Help??


in reply to Contemplating a documentation series for my Raspberry Pi work

Hi again stevieb. It sounds like you have the start of an O'Reilly book on the PerlPi. :-)

One thing I noticed was the number of dependencies for installing all the prerequisite modules for installing the RPi-WiringPi module.

Warning: prerequisite GPSD::Parse 1.01 not found. Warning: prerequisite RPi::ADC::ADS 1.01 not found. Warning: prerequisite RPi::ADC::MCP3008 2.3604 not found. Warning: prerequisite RPi::BMP180 2.3604 not found. Warning: prerequisite RPi::DAC::MCP4922 2.3605 not found. Warning: prerequisite RPi::DHT11 1.03 not found. Warning: prerequisite RPi::DigiPot::MCP4XXXX 2.3604 not found. Warning: prerequisite RPi::I2C 2.3604 not found. Warning: prerequisite RPi::LCD 2.3603 not found. Warning: prerequisite RPi::Pin 2.3603 not found. Warning: prerequisite RPi::SPI 2.3607 not found. Warning: prerequisite RPi::Serial 2.3602 not found. Warning: prerequisite RPi::WiringPi::Constant 1 not found. Warning: prerequisite WiringPi::API 2.3613 not found. Generating a Unix-style Makefile

Additionally cpan didn't want to install automatically. When I try "cpan install RPi-WiringPi" it returns without finding the module. You need to use "cpan install RPi::WiringPi", and even then a bunch of errors are generated in the cpan tests regarding an unknown error in installing WiringPi::API . It would be nice if you made a Bundle:RPi or something similar.

I finally read that you need to install WiringPi C lib first, before installing WiringPi::API. Then I also needed to manually install RPi-Pin-2.3603. Other than those glitches, it all installed fine.

My next project is driving a 64x32 led display. :-)

I think you ought to look for a publisher.


I'm not really a human, but I play one on earth. ..... an animated JAPH

Replies are listed 'Best First'.
Re^2: Contemplating a documentation series for my Raspberry Pi work
by marto (Cardinal) on Jul 04, 2017 at 13:47 UTC

    "Additionally cpan didn't want to install automatically. When I try "cpan install RPi-WiringPi" it returns without finding the module.

    Neither cpan nor cpanm will allow you to install modules like this:

    marto@shemp:~$ cpan install RPi-WiringPi Reading '/home/marto/.cpan/Metadata' Database was generated on Tue, 04 Jul 2017 12:53:45 GMT Warning: Cannot install RPi-WiringPi, don't know what it is. Try the command i /RPi-WiringPi/ to find objects with matching identifiers. marto@shemp:~$ cpan install HTML-Template Reading '/home/marto/.cpan/Metadata' Database was generated on Tue, 04 Jul 2017 12:53:45 GMT Warning: Cannot install HTML-Template, don't know what it is. Try the command i /HTML-Template/ to find objects with matching identifiers. marto@shemp:~$ cpanm RPi-WiringPi ! Finding RPi-WiringPi on cpanmetadb failed. ! Finding RPi-WiringPi () on mirror http://www.cpan.org failed. ! Couldn't find module or a distribution RPi-WiringPi marto@shemp:~$ cpanm HTML-Template ! Finding HTML-Template on cpanmetadb failed. ! Finding HTML-Template () on mirror http://www.cpan.org failed. ! Couldn't find module or a distribution HTML-Template

    On a related note, you could vastly reduce the time to install modules by using cpanm over cpan, it's paninful to watch cpan install modules on a Raspberry Pi. Once the dependancy wiringpi is installed cpanm RPi::WiringPi installs everything in a reasonable time for a Modeal A v1 Pi running a bunch of other stuff (apache, openvpn etc).

    Update: parent updated since posting reply: adding "I finally read that you need to install WiringPi C lib first, before installing WiringPi::API. Then I also needed to manually install RPi-Pin-2.3603. Other than those glitches, it all installed fine."

Re^2: Contemplating a documentation series for my Raspberry Pi work
by stevieb (Canon) on Jul 04, 2017 at 13:40 UTC

    Hey zentara,

    I'm just finalizing a significant upgrade/enhancements to the "pin registration" system. This is a protection mechanism that 100% ensures that if there's a crash or interrupt of any sort, we roll back the configuration of all pins we know about, and restore their state and functionality back to how we had it before exiting. It also protects someone from registering the same pin twice for different purposes by accident. Yesterday, I added this pin registration functionality to all of the various objects you can create through the $pi object (ie. if you create a shift register or ADC, we'll automatically register those pins). You really don't want to accidentally send a shift reg into bizarre behaviour just because you forgot that you're flipping a pin that's say for example the communication pin for the other device :)

    I think that system will be important especially for users who are new to the platform.

    Once I've got all of the quirks worked out (today), I will focus my attention on the entire installation of everything and smooth out any wrinkles. Thanks for letting me know!

    Also, please do share the code you come up with for the LED matrix display. I honestly have never used one. The farthest I ever got was chaining four shift registers together with eight LEDs per register for when I was testing shiftreg functionality originally. Here's an image with two of them. I never documented it with all four due to it not being necessary, but I had them in a grid and that was fun to work with.

      "I will focus my attention on the entire installation of everything and smooth out any wrinkles. Thanks for letting me know!"

      I'd hang on until you had an actual reproducable problem reported, cpanm RPi::WiringPi works without issue on the lowest spec (oldest model) Pi, running many other things.

        That's great to hear, thanks for the heads-up!

Re^2: Contemplating a documentation series for my Raspberry Pi work
by stevieb (Canon) on Jul 06, 2017 at 00:09 UTC
    It sounds like you have the start of an O'Reilly book on the PerlPi

    After a couple of days since you posted this, I actually looked quite deeply into this.

    I have a couple of concerns right off the bat. First, I'm moving out onto a self-sustainable property in the imminent couple of months that is going to take up a lot of my time. This is why I have put in such time and effort getting the code close to what I'm happy with. I am not certain until I've been there at least for several months if I could keep deadlines. Second, I don't know if there'd be the audience for it to be financially viable for O'Reilly, or myself. Perl usage is dwindling if one looks at reality seriously, so that, combined with the fact there's going to be far fewer people using a Pi *and* Perl, the potential audience drops significantly.

    The thought alone is an exciting one, but I've always been a practical person, and reality is what I live by. I'd do it if, you know, the document I'm now going to start makes headway and gets positive reviews, and if it would make fiscal sense to myself (to at least cover costs (ie. time)) and some publisher.

    People for years have told me I need to write a book (my poetry/lyrics, a book about my photographic adventures), but it's an interesting concept writing a book based on my own software and technical achievements.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found