There are 2 obvious choices.

Use an Arduino and Perl. Unfortunately, arduino's need to be programmed in C but then you can talk to them from Perl. So you put the interface to you hardware sensors, relays etc in the Arduino and then you can read and control them from Perl using the usb/serial port or something like HTTP if you add a network card to your arduino. I've done a little of this in the past - see monitoring our machine room temperature with nagios, perl and arduino and Version 2 electricty meter power logging

The second choice is a raspberry pi. Interfacing it to the electronics is slightly harder but there is a Perl module to talk directly to the gpio on the pi. So this would be an all Perl solution.

An arduino (something like an AT Mega) will cost you around £20 and a pi around £25 so little difference there. The arduino will need C code writing so if you want a Perl only solution it will have to be the pi. The pi also has the advantage that it already has networking although this can easily be added to an arduino.

The raspberry pi is really a small computer which has HDMI out so you can connect it to a monitor and usb to connect a keyboard and mouse. People usually install a version of Linux. It will need a power supply and it is really a bit short on memory to run an operating system - I even had problems running out of memory installing CPAN modules at first (see Raspberry Pi - will it get our children programming? and if so why not in Perl?). The arduino on the other hand can be powered off the usb port or a small battery and has loads of options to cut power usage to run for longer times on a battery.

Simple temperature probes will be fairly easy. Turning on/off heating elements will be harder as you have to isolate them from the controller. You're going to need some electronics knowledge.


In reply to Re: Perl Code To Control Industrial Applications? by mje
in thread Perl Code To Control Industrial Applications? by jdlev

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.