TeCoEd (Teaching Computing Education)
  • Home
    • Freelance
    • Book
    • Downloading
  • Python
    • Learn Python >
      • Python Modules
    • PyGame Zero
    • Python Programs >
      • Higher or Lower
      • Magic Calculator
      • Password Checker
      • Python Pit
    • What's News App
    • Pixels to Cells
    • Python Mosaics
    • Python OCR
    • L-1-AM
    • Web Scraping >
      • Scraping Trains
    • Weather App
    • Snakes and Windows
    • Python Web Server >
      • Flask
    • Python Picks
  • Ras Pi
    • All About the Pi
    • Getting Started
    • Remote Desktop and VNC
    • Static IP Address
    • Sonic Pi >
      • 3.14
    • Twitter Feed >
      • Tweepy
    • Android & Pi >
      • Advanced Apps
      • Odds
    • A.I on the the Pi
    • CRON
    • Pick Your Own
  • Pi Hardware
    • Pi HATS >
      • Sense Hat Hacks
      • AstroPi HAT
      • Unicorn-HAT >
        • Unicorn Alphabet Disco
        • Uni Codes / Programs
      • Skywriter
      • Piano HAT
    • STS Pi
    • Pi Camera >
      • Pi-Cam, Python & Email >
        • Time Lapse
      • Pi Noir
    • Pipsta >
      • Flask, Input & Printers
    • Raspberry Pi Power >
      • Energenie IR power
    • Pibrella
    • Distance Sensor
    • LCD Screen
    • Pi-Tooth
    • Robot Arm
    • PiGlow
    • PiFM
    • Accelerometer
    • PiFace >
      • Installing PiFace >
        • Python Commands
  • Pi-Hacks
    • Drone Hacks
    • Pi Glue Gun Hack
    • Blinkt!
    • Sonic Pixels
    • R2D2
    • Get to the chopper
    • Astro Bird
    • Twitter Translator
    • Hacking a Robot
    • Nature_Box >
      • Best Nature Photos
    • Wearable Tech >
      • Project New York
      • P.N.Y Part 2 Health
      • P.N.Y Part 3 Games
      • P.N.Y Part 4 Translation
    • Dino-Tweet
    • Other Links
  • Pi-Hacks 2
    • The Joker
    • Hologram Machine
    • Google Vision: Camera Tell
    • Yoda Tweets
    • Pi Phone
    • Darth Beats
    • Twitter Keyword Finder
    • Crimbo Lights Hack
    • Xmas Elf
    • Halloween 2016
    • Halloween Hack 2015
    • Socrative Zombie
    • Voice Translation
    • The Blue-Who Finder
    • GPIO, Twitter
    • Pi Chat Bot >
      • Dictionary Definitions
    • PiGlow & Email
    • Pibrella Alarm System
    • SMS with Python >
      • Spooking a Mobile
  • Pi-Hacks 3
    • LED Dance Suit
    • Ferminal
    • Crypto Tracker
    • David Bowie
    • Lamp Prank >
      • TEST
    • Yoda FM
    • Retro Player
    • LED Pixel Art
    • TARDIS
    • Battleships
    • LED Board
    • Night Vision
    • Enviro+ Weather
  • Minecraft
    • Minecraft API
    • Minecraft Sweeper
    • PiGlove: Minecraft Power Up
    • Minecraft Photo-booth
    • Rendering Pixels
    • Speed Cube
    • Lucky Dip
  • Computing
    • Why Computing?
    • Can You Compute
    • micro:bit
    • Coding Resources
    • Learn to Code >
      • Coding with iPads
      • Apps Creation Tools
      • sKratchInn
      • Sound Editing
    • Cheat Sheets
    • Theory
    • HOUR OF CODING
    • BEBRAS Computing Challange
    • Computer Facts
    • Free Software and Links
  • Contact Me
  • Random Hacks
    • Movile

DOCTOR WHO MUSIC PLAYER

I acquired an old Doctor Who Money Box from a car boot sale, for a pound, but it sat on the shelf for many months as I didn't know what to do with it.  Then Pimoroni released their Pirate Audio range.  A small HAT, or as they call them pHAT, which sits neatly on the top of a Raspberry Pi Zero.  Guess what, it is also the perfect size for attaching to one of the side panes of the Doctor's TARDIS.

Because the TARDIS was a money box it is hollow inside.  
This makes it perfect for housing the Raspberry Pi and meant that I could simply slot in the Raspberry Pi and the speakers inside TARDIS.  Although I did have to use a Dremel to carefully remove some of the plastic. 

The pirate audio is easy to set up and Pimoroni have made a really good guide which makes it clear and simple to set it up.  I copied over a few MP3 music files onto the Raspberry Pi placing them in the Standard Music Folder and when I ran the software from Pimoroni it automatically found the music files and added them to the pirate audio 

The TARDIS uses Mopidy which is a free extensible music server written in Python, perfect for running on the Raspberry Pi, this enables you to access the TARDIS (Raspberry Pi) directly from a laptop tablet or mobile device.  Simply key in the IP address of your Raspberry Pi and it will take you to the setup page, from here you can create track listings, playlists and you can also link your Spotify or other 3rd party music streaming services. 

One of the configurations that I had to make was to the IP address as this is a dynamic IP address so it changes every time that you load up the Raspberry Pi.  This is a problem because it means that you always must enter in the new IP address in order to access your music. To solve this issue, I set up a static IP address, thanks to the PiHut for their simple how to user guide. 

The final feature of the TARDIS is its flashing blue light.  I wrote a simple Python code to enable the blue LED to flash. This was coded using GPO Zero and basically consists of four functions, one that flashes the light another one that keeps the light static, a third one that flashes the light slowly and the forth one that pulses the light.  When the Raspberry Pi boots up a crontab is run which executes the Python program which selects a random function, therefore you get a random light output and some music. 
​
Check out Pimoroni's range of Pirate Audio which are available here : 

Click below for code

Picture
Powered by Create your own unique website with customizable templates.