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

Re: Is Perl on the Raspberry Pi worth it?

by haukex (Archbishop)
on Jun 19, 2019 at 20:34 UTC ( [id://11101594]=note: print w/replies, xml ) Need Help??


in reply to Is Perl on the Raspberry Pi worth it?

I have several Raspberry Pi's in service / planned to be in service:

  • Two (sometimes three) running on this aircraft:
    • One with a GPS receiver, it provides a WiFi AP for the onboard Ethernet, a DHCP server, and an NTP server that is tightly synchronized to GPS time. I also put together a duplicate of this system for this aircraft.
    • One that runs the dataloggers I wrote in Perl (available here) to log data from multiple sources, the measurement system is a five hole probe combined with an INS and meteorological sensors with the goal of doing Eddy covariance measurements, including methane and CO2 using a separate system. (In fact, this was the system that inspired WebPerl - even if priorities shifted and I didn't get to rewrite the web interface in Perl (-: )
    • We have a third system, not built by me, that we can optionally install and that uses an RPi to control and read out both a multispectral camera and a thermal camera and store the images.
  • I'm working on an RPi that will connect to a datalogger on one of our weather stations in order for us to transmit its data to our servers over a nearby WiFi network.
  • I'm designing a data logger for an in situ CO2 probe that will most likely be running a WiFi AP and hosting a web interface to configure the logger, and view and download the logger data. And I hope to get a chance to use your RPi:: libraries here!
  • Plus of course the various RPi's I have sitting in my lab and at home (RetroPie is great).

... and of course I use Perl on all of them, more or less heavily :-)

Speaking in general, one of the many things I like about Perl is its how tightly it is integrated with *NIX OSes - just look at how many Perl functions mirror the underlying APIs. And one of the things I like about RPi's is that they are basically embedded systems, with many similarities to systems with much smaller microcontrollers, but they in fact are full-fledged Linux systems (the only real caveat being the higher power consumption). In a time where many things are getting abstraction layers (cloud services, JavaScript on the server, REST APIs for everything...), I think the *NIX philosophy is still alive and well in the RPi world. And so IMHO this is a great place for Perl to shine :-)

Since Raspberry Pi's are aimed at teaching about embedded systems, I think the learning aspect is important. Look at it this way: if we didn't have these libraries for newcomers to simply reach for, then what reason would they have to seriously consider Perl <update> for their hardware interfacing needs? </update> So I think it's great you've made all those modules available! :-)

Replies are listed 'Best First'.
Re^2: Is Perl on the Raspberry Pi worth it?
by stevieb (Canon) on Jun 22, 2019 at 19:40 UTC

    That's pretty awesome what you're doing here. I'd love to learn more about some specifics off-line sometime if you're up for it.

    I've also written comms software which I use to communicate with microcontrollers (ESP, Arduino etc etc). Oftentimes, I need much more precise timing than the Pi micro-computer can handle, so I use a controller to perform certain tasks, then either poll or read from the microcontrollers for the data they've accumulated.

    My community has 20 houses on the edge of a lake. Recently, I designed a system that replaced the manual work in the water purification "plant":

    • Arduino Metro:
      • Monitor chlorine mixture tank volumes
      • Monitor various mixture content levels
      • Monitor liquid and plant temperature and other environmental aspects
      • Engage 120v (mains) pumps to fill liquids, with flow-sensors to monitor and ensure the correct mixture of chemicals/h20
      • Manage various water and chemical solenoids to stop/start flow
      • Set emergency and warning flags, and disable parts of the system if issues are detected
    • ESP8266-12E NodeMCU:
      • Is outside of the purification plant house, facing towards a building on my property about 400 metres away. It is attached to the main device that's inside the building via a 30' Cat-6 Ethernet cable. This cable supplies 12v power along with a Tx and Rx serial line
      • It polls the inside unit for all of its data using the serial interface
      • It uses its Wifi connection to a Raspberry Pi on the outside of the building by my house to send all of the data to me
    • Raspberry Pi
      • Is on the side of a building beside my house
      • Is connected via Ethernet to a "dumb" cheap D-Link Wifi-Ethernet bridge
      • Accepts communication from the ESP over Wifi, forces it through the D-Link on another Wifi connection, which I can access from home
      • Responsible for simply sending the data to me

      That sounds pretty cool! And sure, feel free to ask about my systems - a lot of the stuff is already up in the hgpstools repo. For the CO2 logger on my list above, I've been considering combining an Arduino with an RPi, where the Arduino does the data logging and the RPi is only woken up to do the WiFi user interface, to conserve power while it's deployed in the field doing autonomous measurements, but I haven't fully decided on that set-up yet - but now that you mention it, the ESP8266 NodeMCU looks pretty interesting too!

      Do you use any solution to monitor multiple RPi's, i.e. whether they're still on-line and sending data regularly etc? That's an issue I'll probably have to tackle eventually, as the number of RPi's (and other measurement stations) I deploy grows.

Log In?
Username:
Password:

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

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

    No recent polls found