<p dir="ltr">Perfect, thank you Doug!</p>
<div class="gmail_quote">On Jan 19, 2016 12:48 AM, "Doug Crompton" <<a href="mailto:doug@crompton.com">doug@crompton.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><font 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></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">; When you configure a GPIO pin, you can either designate it as </font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">; 'in' (input), 'out0' (output with a default state of 'off'), </font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">; or 'out1' (output with a default state of 'on'). </font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">gpio1=out0 ; in, out0 or out1</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">This sets the bit as default off</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font 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 face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">In the [functions] section of rpt.conf -</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">82=cop,62,GPIO1=0 ; Turn off GPIO 1 </font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">83=cop,62,GPIO1=1 ; Turn on GPIO 1</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font 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 face="Tahoma,sans-serif"><br></font><font 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 face="Tahoma,sans-serif">See -</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><a href="http://ohnosec.org/drupal/node/177" target="_blank">http://ohnosec.org/drupal/node/177</a></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font 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 face="Tahoma,sans-serif">Also see the USB GPIO and using GPIO on the Pi howto's on the <a href="http://hamvoip.org" target="_blank">hamvoip.org</a> 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"><a href="http://www.crompton.com/hamradio" target="_blank">http://www.crompton.com/hamradio</a></font></b><font style="font-size:16pt" size="4"><br></font><br><br><div><hr>Date: Mon, 18 Jan 2016 23:47:53 -0600<br>From: <a href="mailto:n4wgy.ham@gmail.com" target="_blank">n4wgy.ham@gmail.com</a><br>To: <a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a><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><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
<a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a>
<a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a>
Visit the BBB and RPi2 web page - <a href="http://hamvoip.org" target="_blank">http://hamvoip.org</a></div> </div></div>
<br>_______________________________________________<br>
<br>
arm-allstar mailing list<br>
<a href="mailto:arm-allstar@hamvoip.org">arm-allstar@hamvoip.org</a><br>
<a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" rel="noreferrer" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a><br>
<br>
Visit the BBB and RPi2 web page - <a href="http://hamvoip.org" rel="noreferrer" target="_blank">http://hamvoip.org</a><br></blockquote></div>