<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 02/05/2014 05:03 PM, Pete Hardie
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMdBqcNXBnb22qAT3JU=U=odNTvCDPB4tsrf8uZvskgRUC7OOQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif;font-size:small">I
          knew a guy who tried to write Pascal in C like that<br>
        </div>
      </div>
    </blockquote>
    :)<br>
    <br>
    I'm doing a RPi presentation tomorrow night so I wanted to add a
    reboot/halt button to my<br>
    digital radio hotspot.&nbsp; I'm running a LED on the GPIO to let me know
    when the RPi can "see" the Internet and that I wrote in Perl.&nbsp; The
    button examples were in Python and lacking time I just went with
    it.&nbsp; I've done Python in the past and it has not been that hard to
    pick up.&nbsp; I'm lucking up that I'm reading pages on the Internet that
    say if you did this in X you do it in Python this way.<br>
    <br>
    Since many of the examples for GPIO control are done in Python I'm
    going to show that code in the presentation.&nbsp; Honestly, RPi.GPIO is
    so much cleaner looking than Device::BCM2835.&nbsp; Since one program
    manages reboot/halt and another manages the user notification I'm
    may just consolidate the two into a python one.&nbsp; The perl one uses
    threads.&nbsp; One thread does a ping to the outside and sets a value.&nbsp;
    The other watches a log file to see if the radio is linked to a
    system.&nbsp; If it is linked we get a flashing LED.&nbsp; If it is just
    connected to the Internet we get solid LED.&nbsp; If no connection the
    light goes out.<br>
    <br>
    The RPi GPIO is nice, but I prefer doing stuff like this on the
    Arduino platform.<br>
    <br>
    Chris<br>
  </body>
</html>