[arm-allstar] HamVoIP I/O support - What is Best Current Practice for implementing I/O?
Randy Neals
randy at neals.ca
Sun Jan 14 17:49:58 EST 2018
Thanks Doug!
Randy
On Fri, Jan 12, 2018 at 9:50 AM, "Doug Crompton via arm-allstar" <
arm-allstar at hamvoip.org> wrote:
> Randy,
>
> Attached is the bcd_control.sh script. It controls 16 channels or 4 bits.
> It has a strobe on a 5th bit that can be ignore if not needed. Here is and
> example running it at the linux prompt -
>
> ./bcd_control.sh 2
> Entered Channel 2
> Channel 2 written to BCD - 0010
>
> and just a portion of a 'gpio readall' showing the bits
>
> | 5 | 21 | GPIO.21 | OUT | 0 | 29
> | 6 | 22 | GPIO.22 | OUT | 1 | 31
> | 13| 23 | GPIO.23 | OUT | 0 | 33
> | 19| 24 | GPIO.24 | OUT | 0 | 35
> | 26| 25 | GPIO.25 | OUT | 0 | 37
>
> To control from Allstar here is one way to do it. Add to the functions
> stanza, assumes the script is in /etc/asterisk/local. Make sure the script
> is executable - chmod 750 bcd_control.sh. Run it manually as above to
> confirm. You only need to enter functions for as many channels as you have.
> In your case 3 bits or 8 channels. The script was not written for a
> Motorola but it should work fine.
>
> 801=cmd,/etc/asterisk/local/bcd_control.sh 1
> 802=cmd,/etc/asterisk/local/bcd_control.sh 2
> 803=cmd,/etc/asterisk/local/bcd_control.sh 3
> 804=cmd,/etc/asterisk/local/bcd_control.sh 4
> 805=cmd,/etc/asterisk/local/bcd_control.sh 5
> 806=cmd,/etc/asterisk/local/bcd_control.sh 6
> 807=cmd,/etc/asterisk/local/bcd_control.sh 7
> 808=cmd,/etc/asterisk/local/bcd_control.sh 8
> 809=cmd,/etc/asterisk/local/bcd_control.sh 9
> 810=cmd,/etc/asterisk/local/bcd_control.sh 10
> 811=cmd,/etc/asterisk/local/bcd_control.sh 11
> 812=cmd,/etc/asterisk/local/bcd_control.sh 12
>
> etc....
>
> Another way to do this is use the autopatch in command mode. Then you just
> need one line in rpt.conf and a custom extensions.conf stanza. See the
> howto on the hamvoip.org web page.
>
> https://www.hamvoip.org/Allstar_extended_functions_using_autopatch.pdf
>
> Again - VERY IMPORTANT! The Pi is 3V GPIO logic. Use diodes pointed
> towards the radio on each line. You may possibly need to use pullups on the
> radio side of the diode if the radio does not supply them. The radio lines
> probably float high. If they do that won't be necessary.. You also need a
> ground connection between the radio and the Pi. This could be Pi pin 37 or
> any defined 0V pin.
>
>
> *73 Doug*
>
> *WA3DSP*
>
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>
>
>
> On Fri, Jan 12, 2018 at 2:53 AM, "Randy Neals via arm-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> Hi,
>>
>> What is the best current practice for implementing I/O on a Raspberry Pi
>> to
>> control external things.
>> In this case, remote channel selection on a VHF remote base, a radio with
>> 8
>> channels and having external control lines.
>>
>> From looking through the list archives, I see references to using an
>> Arduino Nano, and at an earlier time, using a USB I/O board from SparkFun,
>> and of course using the lines on the RPi itself.
>>
>> Anticipated questions...
>>
>> Q. What Am I trying To Do?
>> A. Control channel select lines on a VHF remote base station.
>>
>> Q. What format/How many lines?
>> A. 3 logic control lines. The lines are normally pulled up to +5V by the
>> radio.
>> BCD format with the lines having binary weighting of 4, 2, and 1
>> respectively.
>> High = weighted value / Low = zero value.
>>
>> Q. What audio interface will I use?
>> A. Simple USB, likely DMK URI. (But I could use a USB FOB, or other
>> interface if there is one with I/O)
>>
>> Thanks,
>> Randy
>> W3RWN
>> _______________________________________________
>>
>> arm-allstar mailing list
>> arm-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>>
>
>
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
More information about the arm-allstar
mailing list