<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:16 PM, Chris Fowler
wrote:<br>
</div>
<blockquote cite="mid:52F2B850.4080603@outpostsentinel.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<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. 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. The button examples were in Python and lacking time I just
went with it. I've done Python in the past and it has not been
that hard to pick up. 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. Honestly, RPi.GPIO
is so much cleaner looking than Device::BCM2835. Since one
program manages reboot/halt and another manages the user
notification I'm may just consolidate the two into a python one.
The perl one uses threads. One thread does a ping to the outside
and sets a value. The other watches a log file to see if the
radio is linked to a system. If it is linked we get a flashing
LED. If it is just connected to the Internet we get solid LED.
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>
</blockquote>
There is a wiring library for the Pi.
<a class="moz-txt-link-freetext" href="https://projects.drogon.net/raspberry-pi/wiringpi/">https://projects.drogon.net/raspberry-pi/wiringpi/</a><br>
<br>
It works well. <br>
<br>
Jim.<br>
</body>
</html>