What is it?
Paperplayer is a piece of paper that plays and does all other control on music. It is easy to build with the tools and instructions below.
What do I need?
|Image||Name||Description||Part No.||Qty.||Where to Buy||Where to Borrow|
|Arduino Uno R3||AVR board that reads real life inputs||A000066||1||CArobotix||SEEK @ UOIT|
|Raspberry Pi||Microcomputer used for prototyping||RASPBRRY-MODB-512M||1||Element14||SEEK @ UOIT|
|HDMI Cable||Shows video from computer on monitor/tv||None||1||Electronics Shop||None|
|Power Adapter||Powers Raspberry Pi with closely 1.2Amps current||None||1||Cellphone charge||None|
|4 Gb or larger SD card||Acts as "Hard Disk" for Raspberry Pi||None||1||Electronics Shop||None|
|Pencil and Paper||Shade with pencil play controls on paper||None||1||Stationery Isle at Shop||School library|
|1 Mega Ohm Resistor||Pack of 5 Resistor circuit elements||None||1||Dipmicro||SEEK @ UOIT|
What to do on Raspberry Pi?
First time use of Raspberry Pi needs means your Pi's "hard disk" does not have the operating system on its SD card.
- "I am using a new SD card":
- Download latest Raspbian operating system. Then install Win32DiskImager (for Windows) or ApplePi-Baker (for Mac). Unzip Raspbian download. A file .iso will be extracted. Use Win32DiskImager or ApplePi-Baker to flash or "burn" it to the SD card you have inserted in the card reader of your laptop/pc. After it completes flashing the .iso image to the SD card, pop the SD card out and insert into the Raspberry Pi.
- "I am using same SD card that I used with my Raspberry Pi last time":
- Do nothing, go to next step.
Insert SD card into your Raspberry Pi, then connect its:
- HDMI jack to monitor/tv
- LAN interface to ethernet jack
- Power pin to AC power outlet.
- USB receptacles to a usb-compatible keyboard and mouse
RPi has no "on", "off" button, once you power it, it automatically starts. To login, wait until you are asked by your RPi. Use
Username: pi and
Password: raspberrypi to login. Then, do the command
pi@raspberrypi:~$ startx if you remain on the terminal console even after logging in.
From your desktop, open the internet browser and go to website you are on now.
Download source code and unzip it.
- "playmusic.py" - To listen to touch from Arduino and plays music on Raspberry Pi. Download and unzip the source-code on your laptop.
- "readtouch/readtouch.ino" - To be run on Arduino for detecting a touch on the pencil shaded area.
Connect your Arduino to the Raspberry Pi via USB cable. Arduino shipment should include this USB cable. If it did not, printer USB cable will work as well. Now do:
pi@raspberrypi:~$ sudo apt-get update && apt-get install python-serial arduino
What to do on Paper with Pencil?
As shown in Figure 1, you shade with pencil on your white blank paper and do the wiring job.
Figure 1 On blank paper attach one end of wire with tape or play dough on the shaded area. The other end of the wire goes to the specified pins on Arduino board.
Arduino pins are connected by wire to the shaded areas. These pins need resistors, as shown in Figure 2
What to do on Arduino?
You access Arduino from your Raspberry Pi. Start the IDE for Arduino by clicking the "start menu" > "Programming" > "Arduino"
- Open from Arduino IDE
readtouch/readtouch.ionfrom the source-code folder.
- At top left corner, click "Verify" and "Upload".
Figure 2 Breadboard setup of resistors with pins.
How to use PaperPlayer?
Make sure you keep your Arduino board plugged into your Raspberry Pi's USB - it make sures that Arduino board provides the standard 3.3 Volt of power to the AVR microcontroller in it.
On your Raspberry Pi, do command
pi@raspberrypi:~$ cd path/to/your/source-code and then
pi@raspberrypi:~$ python playmusic.py
Now plug headphones or speakers into Raspberry Pi's Audio Jack. Just touch pencil shaded shape "Play" on your paper for a while. Immediately music will be played. Touch other shapes to go to next or previous track, or stop the play.