Introducing talkiepi.
New post: http://projectable.me/i-built-a-wifi-walkie-talkie-for-my-kids-now-you-can-too/
Ive had this idea for a VERY long time, to build a relatively cost effective, kid friendly, internet enabled walkie talkie. It has to be as simple as an oldschool walkie talkie to use, but it should run over wifi and allow kids to communicate with their friends in a simple and reliable way.
I recently came across a commandline mumble client written in go, called Barnard. When I tested it, it seemed to do the job, so this weekend I ran with it and created talkiepi.
The biggest hurdle I had was finding a GPIO library that worked for my use case, and worked inside the existing barnard codebase. My initial digging with go-rpio was a huge headache of crashes that shouldnt happen. So I decided to go the sysfs route and settled on a slight modification to Brian Armstrong's go GPIO library. After getting this working I realized I still had to enable the internal pullup on the button pin, so I went back to using go-rpio for just that.
I managed to fix the bug that stopped audio from sending when you press the button the second time. talkiepi is now fully functional! I will be working on some cleanup and housekeeping stuff (such as config files) next.
Try it yourself!
You can play with it on your pi and see how it goes, I do recommend using the latest raspbian image though.
First install the required raspbian packages apt-get install golang libopenal-dev libopus-dev
. Once installed setup your GOPATH
. I recommend creating a directory in your home called gocode
, then export GOPATH=$HOME/gocode
. You can add that to your .profile to persist it for future logins etc.
Change to your new directory cd $GOPATH
and then run the following:
go get github.com/layeh/gopus
go get github.com/dchote/talkiepi
Now you can jump in to the code and run it:
cd $GOPATH/src/github.com/dchote/talkiepi
go run cmd/talkiepi/main.go -server %YOUR_MUMBLE_SERVER_IP% -username %USERNAME_FOR_MUMBLE%
If you want to use a USB speakerphone device like I am, plug it in and run aplay -l
to determine the device number, and then edit your alsa config /usr/share/alsa/alsa.conf
changing the defaults to use the index of your USB device (typically 1).
defaults.ctl.card 1
defaults.pcm.card 1
Whats Next
I will work on getting this stable in my free time. In short order here are the next set of features I will be adding:
- Join a specified channel
- Config file for all settings
- Systemd script to start on boot
I will also work on modeling an enclosure for everything to go in!