I recently received a new Raspberry Pi and wanted to create an Intro to Raspberry Pi project. My Pi included a 16x2 LCD display and a Wi-Pi Card so I created the Wireless Raspberry Pi Powered Joke Machine. Just press the push-buttons and the machine will look up a one-liner and scroll through it. (Admission of guilt here...I originally thought it would be neat to create a desk-toy that could display inspiring and educational famous quotes...the Joke Machine can do this, but when I found I could just as easily generate one-liners, I decided that would be more fun :-) )

This Step by Step Instructable walks you through the process of setting up a new Raspberry Pi, adding the the PiFace Control and Display LCD, the WiPi wireless and the provided python script TheQuoteMachine.py which looks up jokes and quotes on a free service called iheartquotes.com. it'll also describe how to access your Pi without need for a keyboard or Display using VNC remote access.

Parts Needed
  • Raspberry Pi model B
  • 8G SD Card with NOOBS installed
  • Pi micro-usb cable and adapter
  • WiPi wifi adapter (or ethernet cable)
  • PiFace Control and Display - LCD Display which includes 7 buttons and an IR chip
  • During setup you'll want a USB keyboard, an HDMI cable and Monitor
  • Project box - I had an old watch gift box laying around 
Tools needed
  • Tin snips to cut slots in project box
  • Dremel style tool to cut a hole for the LCD display and smooth sharp edges
  • Label maker
  • Sharpie to mark the project box
  • Vinyl tape

Here's a Video of the Joke Machine in action:

Step 1: Setting Up the New Pi With NOOBS

A Raspberry Pi comes with "Do it Yourself Filling", that is you decide what flavor of Linux you want on it. An easy way to do this is to use a NOOBS SD card to install Linux 

NOOBS stands for New Out of the Box Software. You can buy a pre-installed NOOBS SD card (what I used for this project) or download your own from http://www.raspberrypi.org/downloads.
I connected an HDMI cable, power adapter and USB keyboard (no ethernet is needed for NOOBS) When NOOBS boots up, I was presented with the following options to install:
  • Archlinux - a configurable linux distro not recommended for newbies
  • OpenELEC - Open Embedded Linux Entertainment Center (OpenELEC) a small Linux distribution meant to be a media Center
  • Pidora - Pidora is a Fedora Remix optimized for the Raspberry Pi computer
  • RaspBMC - the XBOX Media Center interface
  • Raspbian (Recommended) Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware
  • RiscOS - RISC OS is a British operating system designed specifically for the ARM processor

I picked the recommended Raspbian flavor of Linux

After the formatting finished I used the configuration screen to:
  • Change from the default ID and password of pi / raspberry
  • Enabled ssh from the advanced options (more about SSH later)
Next I ran the startx command to bring up the graphical desktop

Never mind I was spelling chmod wrong
Im having an issue it might be because I don't have the pi face installed into it yet but the code Chomd +x /home/pi/TheQuoteMachine.py it doesn't work I tried to run it in the terminal and python
<p>Nice one , I was also struck with same idea to create something called &quot;words of wisdom&quot; with Pi. But I would rather like to use C for programming Pi. I'm using WiringPi for GPIO control , can you plase tell me is it possible to replicate that with C. Thanks</p>
<p>is not usefull for jokes, i will give another use: like, things that i have to remember anyway, thanx</p>
<p>This is a really cool idea! I like the prospect of the joke machine. I had an idea for another function. I am thinking about taking your design and making a Fortune Cookie Machine. I found this little metal fortune cookie at a bookstore and I thought it would be cool to make a device like this and attach the metal cookie thing to it and make it generate fortunes. I have not worked with a Raspberry Pi yet, but I think this would be a really cool project to start working with it, when I can spare some cash to get supplies.</p>
thx! I'd like to see what the fortunecookie looks like. The website I get jokes from also has fortunes. You could find a thermal printer and print them out! surplus stores sometimes have them as old credit card machines. use a model a pi to save some money and store the quotes on the sd card to reduce the need for the Wii pi csrd. Good luck!

About This Instructable




More by mazzmn:Build a Lawn Chair from Recycled Skis - The Ski Chair! Control Video Games with Icicles!  Custom Crazy Taxi Video Game Controller with Makey Makey 
Add instructable to: