Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: LED blinking Morse code from Raspberry Pi

by zentara (Archbishop)
on Aug 31, 2014 at 08:52 UTC ( [id://1099107]=note: print w/replies, xml ) Need Help??


in reply to LED blinking Morse code from Raspberry Pi

I know it's a sin, but I envy you and your project.... its so cool from a geek standpoint. Does this mean that you need some sort of socket i/o connection to the Pi, but the Perl script runs on your computer? Or can a Pi run the Perl?

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: LED blinking Morse code from Raspberry Pi

Replies are listed 'Best First'.
Re^2: LED blinking Morse code from Raspberry Pi
by afoken (Chancellor) on Aug 31, 2014 at 11:09 UTC

    A raspi usually runs a Linux distribution, Debian or something derived from that. (Other systems like the BSDs are also possible.) So, running Perl on the raspi should be no problem, and according to the module name Device::BCM2835, I guess the code runs on the raspi. The BCM2835 is the SoC, around which the raspi was designed. 700 MHz ARM CPU and 512 MByte RAM should be sufficient for Perl and lots of other things. Some years ago, a common PC or Mac had less RAM and a slower CPU clock, and even then, running Perl on Linux or *BSD was no problem. Update: According to the Wikipedia Article, the raspi CPU performance is roughly equal to a Pentium III 300 MHz.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      The (I would assume) most widely used Pi-disto is called Raspian and is indeed based on Debian.

      You can without problems either use the perl that comes with it or install your own by hand or via perlbrew (compilation however is a bit slow of course).

      Also installing cpan-modules is no problem.

Re^2: LED blinking Morse code from Raspberry Pi
by rje (Deacon) on Sep 01, 2014 at 21:27 UTC
    As mentioned already: yes, the RPi can run one of several Linux distributions. I've run Arch Linux before; currently a version of Debian is on my RPi. The OS is stored on a SD card, which can also act as storage.

    The standard "Raspbian" install comes with Perl, and I've used CPAN to install modules (such as the package I mentioned).

    I posted this code because I've just discovered how to use the I/O pins to read or write data to/from the outside world, with Perl, on my Raspberry Pi, and I'm excited!

      I'm excited

      Yeah, me too. I guess now the next step would be to get some opto-isolation relays, are be able to send messages out via the LEDS. Then, see if and ports give a varying output, say 128 or 256 voltage levels, then you could use it to provide realtime feedback for controls. After watching the various youtube videos on the newer anti-gravity experiments, it may be that the only way to get one, is to build one yourself.... and I'm dreamin of using the Raspian to do the Hall effect sensor and stabilizer functions. I need to get back to my home world. :-) Get me my Imhotep's flying platform!


      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

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

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

    No recent polls found