Page 1 of 1

Newsline on a Raspberry Pi

Posted: Sun Apr 13, 2014 9:21 pm
by kb9mwr
I guess Bob brought this idea up at a Green Bay Mike & Key board meeting.

My thought is that it would be a great learning project for someone else in the club. This is why I am posting here, and will ask if anyone wants to take a stab at it. I am pretty sure this would not benefit anyone for someone who already knows how to do it.

I am willing to offer assistance, but I am looking for someone who wants a project to learn from.
(So anyone who can do this easy, please don't step forward) Though most of the heavy thinking is in this post. Someone just needs to put it all together and test it.

My thoughts to maybe get someone started:
A cron entry auto downloads the newest newsline each Friday. Then break the file into 2.5 min chunks (to avoid repeater time outs)

Tie a logic output from the 7.12 controller to the input of the Raspberry Pi. This will start the play back. The controller is an Arcom RC-210. Page 11 of the manual talks about general logic outputs. 1812 provides a pulsed (open, low, open) logic output.

Code: Select all

# Example Pi input watcher
#
# Dependancies: wiringPi
# git clone git://git.drogon.net/wiringPi
#
# First you'll need to initalize the gpio
# Uses GPIO 0 as an input:
# gpio mode 0 in
# To toggle the state by hand:
# gpio write 0 1
# gpio write 0 0 
#
#
while true
do

if gpio read 0 | grep --quiet 1 ; then
 echo "Input Active - Play newsline" 
fi
if gpio read 0 | grep --quiet "0"; then
 echo "Input Not Active"
fi

sleep .1
done 
Notes for anyone interested, here is an example of how to find the URL to the latest newsline file.

http://www.qsl.net/kb9mwr/projects/voip/getnewsline.txt

To break the mp3 into 2 min 50 sec pieces for over the air look at:

http://mp3splt.sourceforge.net/mp3splt_page/home.php

You can use some of the pre complied IRLP binaries for keying and start sense if you like:
ftp://irlp.net/pub/irlpv2.0/Bin_ARM.tgz

The binary does PTT on GPIO 17 see: http://www.irlp.net/R_Pi/01-GPIO%20Wiring.JPG
One could use the COS binary for reading the start input GPIO11

Or you can use the wiring pi library.
git clone git://git.drogon.net/wiringPi



Code: Select all

while true
 do 
   if ./cosstate
   then
     STATE="0" 
   else
     STATE="1"
   fi
So spread the word for anyone interested in a Raspberry Pi project.

They can perfect it at home, and can get a hold of me or anyone on the technical committee when its ready for installation.

Re: Newsline on a Raspberry Pi

Posted: Mon Apr 14, 2014 3:37 pm
by kb8zxe
I will give it a shot.