One-button audiobook player features in new book

The One-button audiobook player has been included in the new book Raspberry Pi For Dummies by Sean McManus and Mike Cook. The book covers setting up the Raspberry Pi, using Linux on it, using the Pi for work and play, programming the Raspberry Pi in Scratch and Python, and creating electronics projects.

Co-author Sean McManus told me: “We wanted to finish the book by highlighting some inspiring projects that would give people an idea of what they could do by taking their new programming and electronics skills further. The one-button audiobook player is a nice example of an electronics project, but I particularly like the way it’s really improving someone’s quality of life, by making it possible for your wife’s grandmother to listen to audiobooks. I get a lot of enjoyment from audiobooks myself, so I can imagine how much it means to her to be able to listen to them, especially given her visual impairment.”

Other inspiring Raspberry Pi projects mentioned in the book include a synthesiser, a bird feeder webcam, a weather station and a jukebox.

You can find out more about Raspberry Pi For Dummies at Sean’s website.

Adressenmeister

I’d like to share my very first software project from 1992 with you which was written in BASIC 2.0 on my C64. It has never really been finished but had a nice intro screen with moving sprites and was able to print labels on a wire printer :)

In order to archive it for myself, I’ve set up a github repository where the source code is available: https://github.com/exitnode/adressenmeister

Here’s a little screen-cap of it:

Update:
Here’s a pic of the floppy disk:

The One Button Audiobook Player

This little Raspberry Pi based project is a gift for my wife’s grandmother for her 90th birthday. Being visually impaired, she is hard to entertain but loves to listen to audiobooks. The problem is, that she isn’t able to handle a ghetto blaster or MP3 player.

The solution to this problem was – tadaaaah – a one button audiobook player :)

It basically consists of:

  • 1 Raspberry Pi
  • 1 ModMyPi enclosure
  • 1 button
  • 2 resistors (330 Ohm, 10 Kilo-Ohm)
  • 1 blue LED
  • 1 (slow) 8GB SD-Card
  • some wire
  • a pair of speakers

The following software has been used:

The features are the following:

  • always on: When you power on the raspberry, it will boot up and start the python script with the audio book in pause
  • one button usage: The button pauses and unpauses the audio book or goes back one track when you press the button longer than 4 seconds
  • remembers position: It will always remember the last played position
  • only one audiobook: There will always be only one audio book on the Raspberry
  • easy audio book deployment: When you plug in a USB thumb drive with a special name/label, the Raspberry will stop playing, mount the thumb drive, deletes the old audio book, copies the new one, rebuilds the playlist and – after unplugging the thumb drive – starts the new audiobook in pause mode
  • multi format: Since it uses mpd, the player supports  Ogg Vorbis, FLAC, OggFLAC, MP2, MP3, MP4/AAC, MOD, Musepack and wave

Some pics and a video:

 

(The audiobook used in this video is a free version of Cory Doctorows “Little Brother” from Fabian Neidhardt)

If you like to build your own one button audio book player, here are the super simple schematics:

And last but not least – the python script. The code might be crappy, please comment if you have improvements (especially regarding loadMusic). You can find it on github:

https://github.com/exitnode/theonebuttonaudiobookplayer

Update (2013-11-26)

Here’s what Russel wrote in a comment to this post:

“I just completed building this and have some addendum notes adding more details:

Install the following packages:
sudo apt-get install mpd
sudo apt-get install mpc
sudo apt-get install python-mpd
sudo apt-get install python-pyudev

(below assumes using defaults for /etc/mpd.conf)
sudo mkdir -p /music/usb
sudo ln -s /var/lib/mpd /music/mpd
sudo ln -s /var/lib/mpd/music /music/mp3

Copy the tobabp.py script to /home/pi
nano /home/pi/tobabp.py
Change these in the script or flip the connections in wiring diagram.
BUTTON = 17
LED = 24

Testing
Rename a USB stick to “1GB”
Copy 1 MP3 onto the stick
Insert the stick into pi

sudo mount /dev/sda1 /music/usb
sudo /etc/init.d/mpd stop
sudo rm /music/mp3/*
sudo cp /music/usb/* /music/mp3/
sudo umount /music/usb
Remove the USB stick

sudo rm /music/mpd/tag_cache
sudo /etc/init.d/mpd start
mpc clear
mpc ls
mpc ls | mpc add
sudo /etc/init.d/mpd restart
mpc play

Plug in earphones
You should hear audio
Next try the python script:
sudo python /home/pi/tobabp.py
Insert USB stick
the LED should flash and the USB file copy to /music/mp3/
the LED should flash again. Remove the Stick and LED flashes again.
Press button to start playing
Press button again to stop
Press & hold button to rewind to beginning.

sudo crontab -e
Add following line run at startup
@reboot python /home/pi/tobabp.py &
sudo reboot
Then retest again to be sure all is well.”

 

 

 

 

 

 

Planned: Cat lift

I plan to build this cat lift, so my parents don’t have to pull up the cat basket manually all the time. The problems here are, that it has to be very quiet and should also be hardly visible from the outside when not in use:

The Laundruino

My washing machine is located in the basement. Unfortunately, the time data displayed on the front panel is always inaccurate. So instead of constantly running down the stairs and checking if the laundry is done, I decided to connect the washing machine to my LAN and extend it’s features by a simple http server. This is what I needed for it:

In my case, getting the right signal from the washing machine was simple: It has a “Finished” LED on the front panel, so all I needed to do, was to solder it out and replace it with a two-core wire.

To connect my washing machine with the arduino, I built a minimal shield with a prefboard and a CNY17. Here’s how everything is put together:

Now I have a LOW signal on pin A2 (digital mode) when the laundry is done and a HIGH signal if the machine is running or turned off. In my case, a loop of 100ms duration is needed every time to watch the signal because I don’t get a steady voltage here (I guess the front panel LEDs might be multiplexed). If  the signal becomes LOW once in this time window, the washing machine has finished and the LED would have turned on.

Screenshots:

You can download the code on github: https://github.com/exitnode/laundruino