<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="" color="#000000" face="Tahoma,sans-serif">Robert,<br><br> I should write a howto on this but there is some guidance out there if you search. Basically it is this - <br id="FontBreak"></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">; When you configure a GPIO pin, you can either designate it as </font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">; 'in' (input), 'out0' (output with a default state of 'off'), </font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">; or 'out1' (output with a default state of 'on'). </font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">gpio1=out0 ; in, out0 or out1</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">This sets the bit as default off</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">Then you can create functions to control the bit. The function numbers can be anything you want that does not conflict with those in use.</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">In the [functions] section of rpt.conf -</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">82=cop,62,GPIO1=0 ; Turn off GPIO 1 </font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">83=cop,62,GPIO1=1 ; Turn on GPIO 1</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">So in this case a dtmf *82 would turn the bit off and *83 on. You could also send the command from a macro, a script, the asterisk client, a cron job, etc.</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br>Be careful with the hardware interface. For the DMK/URI they a 5V on the RPi2 3V. There are many isolated cheap relay modules that will interface directly to these bits.<br><br></font><font style="" face="Tahoma,sans-serif">See -</font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><a href="http://ohnosec.org/drupal/node/177" target="_blank">http://ohnosec.org/drupal/node/177</a></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif"><a href="http://latinovoip.net/allstar-and-the-gpio-fan-script-for-dmk-engineering-uri/" target="_blank">http://latinovoip.net/allstar-and-the-gpio-fan-script-for-dmk-engineering-uri/</a></font><br><br><font style="" face="Tahoma,sans-serif">Also see the USB GPIO and using GPIO on the Pi howto's on the hamvoip.org web page. There is a link there for relay modules.<br><br>You have three choices - use the DMK/URI bits as above, use the RPi2 GPIO, or use dedicated USB GPIO. <br></font><br><b><font style="font-size:16pt;" size="4">73 Doug</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">WA3DSP</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">http://www.crompton.com/hamradio</font></b><font style="font-size:16pt;" size="4"><br></font><br><br><div><hr id="stopSpelling">Date: Mon, 18 Jan 2016 23:47:53 -0600<br>From: n4wgy.ham@gmail.com<br>To: arm-allstar@hamvoip.org<br>Subject: [arm-allstar] URIx GPIO use<br><br><div dir="ltr">Greetings everyone.<div>I'm looking for some guidance on manipulating the gpio pins that are available in the URIx.</div><div>It would be particularly nice to learn how to tie configurations of those gpio pins to a *5x macro, if such a thing is possible.</div><div><br><div><div><div class="ecxgmail_signature"><div dir="ltr"><div><div dir="ltr">--</div><div dir="ltr">Robert Conklin<div><font size="4"><b><a href="http://qrz.com/db/N4WGY" target="_blank">N4WGY</a></b></font></div></div></div></div></div></div>
</div></div></div>
<br>_______________________________________________
arm-allstar mailing list
arm-allstar@hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2 web page - http://hamvoip.org</div> </div></body>
</html>