Tag Archives: Harry Potter

Darth Beats: Star Wars LEGO gets a musical upgrade

Post Syndicated from Janina Ander original https://www.raspberrypi.org/blog/darth-beats/

Dan Aldred, Raspberry Pi Certified Educator and creator of the website TeCoEd, has built Darth Beats by managing to fit a Pi Zero W and a Pimoroni Speaker pHAT into a LEGO Darth Vader alarm clock! The Pi force is strong with this one.

Darth Beats MP3 Player

Pimoroni Speaker pHAT and Raspberry Pi Zero W embedded into a Lego Darth Vader Alarm clock to create – “Darth Beats MP3 Player”. Video demonstrating all the features and functions of the project. Alarm Clock – https://goo.gl/VSMhG4 Speaker pHAT – https://shop.pimoroni.com/products/speaker-phat

Darth Beats inspiration: I have a very good feeling about this!

As we all know, anything you love gets better when you add something else you love: chocolate ice cream + caramel sauce, apple tart + caramel sauce, pizza + caramel sau— okay, maybe not anything, but you get what I’m saying.

The formula, in the form of “LEGO + Star Wars”, applies to Dan’s LEGO Darth Vader alarm clock. His Darth Vader, however, was sitting around on a shelf, just waiting to be hacked into something even cooler. Then one day, inspiration struck: Dan decided to aim for exponential awesomeness by integrating Raspberry Pi and Pimoroni technology to turn Vader into an MP3 player.

Darth Beats assembly: always tell me the mods!

The space inside the LEGO device measures a puny 6×3×3 cm, so cramming in the Zero W and the pHAT was going to be a struggle. But Dan grabbed his dremel and set to work, telling himself to “do or do not. There is no try.”

Darth Beats dremel

I find your lack of space disturbing.

He removed the battery compartment, and added two additional buttons in its place. Including the head, his Darth Beats has seven buttons, which means it is fully autonomous as a music player.

Darth Beats back buttons

Almost ready to play a silly remix of Yoda quotes

Darth Beats can draw its power from a wall socket, or from a portable battery pack, as shown in Dan’s video. Dan used the GPIO Zero Python library to set up ‘on’ and ‘off’ switches, and buttons for skipping tracks and controlling volume.

For more details on the build process, read his blog, and check out his video log:

Making Darth Beats

Short video showing you how I created the “Darth Beats MP3 Player”.

Accessing Darth Beats: these are the songs you’re looking for

When you press the ‘on’ switch, the Imperial March sounds before Darth Beats asks “What is thy bidding, my master?”. Then the device is ready to play music. Dan accomplished this by using Cron to run his scripts as soon as the Zero W boots up. MP3 files are played with the help of the Pygame library.

Of course, over time it would become boring to only be able to listen to songs that are stored on the Zero W. However, Dan got around this issue by accessing the Zero W remotely. He set up an online file upload system to add and remove MP3 files from the player. To do this, he used Droopy, an file sharing server software package written by Pierre Duquesne.

IT’S A TRAP!

There’s no reason to use this quote, but since it’s the Star Wars line I use most frequently, I’m adding it here anyway. It’s my post, and I can do what I want!

As you can imagine, there’s little that gets us more excited at Pi Towers than a Pi-powered Star Wars build. Except maybe a Harry Potter-themed project? What are your favourite geeky builds? Are you maybe even working on one yourself? Be sure to send us nerdy joy by sharing your links in the comments!

The post Darth Beats: Star Wars LEGO gets a musical upgrade appeared first on Raspberry Pi.

Shelfchecker Smart Shelf: build a home library system

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/smart-shelf-home-library/

Are you tired of friends borrowing your books and never returning them? Maybe you’re sure you own 1984 but can’t seem to locate it? Do you find a strange satisfaction in using the supermarket self-checkout simply because of the barcode beep? With the ShelfChecker smart shelf from maker Annelynn described on Instructables, you can be your own librarian and never misplace your books again! Beep!

Shelfchecker smart shelf annelynn Raspberry Pi

Harry Potter and the Aesthetically Pleasing Smart Shelf

The ShelfChecker smart shelf

Annelynn built her smart shelf utilising a barcode scanner, LDR light sensors, a Raspberry Pi, plus a few other peripherals and some Python scripts. She has created a fully integrated library checkout system with accompanying NeoPixel location notification for your favourite books.

This build allows you to issue your book-borrowing friends their own IDs and catalogue their usage of your treasured library. On top of that, you’ll be able to use LED NeoPixels to highlight your favourite books, registering their removal and return via light sensor tracking.

Using light sensors for book cataloguing

Once Annelynn had built the shelf, she drilled holes to fit the eight LDRs that would guard her favourite books, and separated them with corner brackets to prevent confusion.

Shelfchecker smart shelf annelynn Raspberry Pi

Corner brackets keep the books in place without confusion between their respective light sensors

Due to the limitations of the MCP3008 Adafruit microchip, the smart shelf can only keep track of eight of your favourite books. But this limitation won’t stop you from cataloguing your entire home library; it simply means you get to pick your ultimate favourites that will occupy the prime real estate on your wall.

Obviously, the light sensors sense light. So when you remove or insert a book, light floods or is blocked from that book’s sensor. The sensor sends this information to the Raspberry Pi. In response, an Arduino controls the NeoPixel strip along the ‘favourites’ shelf to indicate the book’s status.

Shelfchecker smart shelf annelynn Raspberry Pi

The book you are looking for is temporarily unavailable

Code your own library

While keeping a close eye on your favourite books, the system also allows creation of a complete library catalogue system with the help of a MySQL database. Users of the library can log into the system with a barcode scanner, and take out or return books recorded in the database guided by an LCD screen attached to the Pi.

Shelfchecker smart shelf annelynn Raspberry Pi

Beep!

I won’t go into an extensive how-to on creating MySQL databases here on the blog, because my glamourous assistant Janina has pulled up these MySQL tutorials to help you get started. Annelynn’s Github scripts are also packed with useful comments to keep you on track.

Raspberry Pi and books

We love books and libraries. And considering the growing number of Code Clubs and makespaces into libraries across the world, and the host of book-based Pi builds we’ve come across, the love seems to be mutual.

We’ve seen the Raspberry Pi introduced into the Wordery bookseller warehouse, a Pi-powered page-by-page book scanner by Jonathon Duerig, and these brilliant text-to-speech and page turner projects that use our Pis!

Did I say we love books? In fact we love them so much that members of our team have even written a few.*

If you’ve set up any sort of digital making event in a library, have in some way incorporated Raspberry Pi into your own personal book collection, or even managed to recreate the events of your favourite story using digital making, make sure to let us know in the comments below.

* Shameless plug**

Fancy adding some Pi to your home library? Check out these publications from the Raspberry Pi staff:

A Beginner’s Guide to Coding by Marc Scott

Adventures in Raspberry Pi by Carrie Anne Philbin

Getting Started with Raspberry Pi by Matt Richardson

Raspberry Pi User Guide by Eben Upton

The MagPi Magazine, Essentials Guides and Project Books

Make Your Own Game and Build Your Own Website by CoderDojo

** Shameless Pug

 

The post Shelfchecker Smart Shelf: build a home library system appeared first on Raspberry Pi.

Harry Potter and the Real-Life Wizard Duel

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/real-life-wizard-duel/

Walk around the commons of Cambridge and you’re bound to see one or more of the Cambridge University Quidditch Club players mounted upon sticks with a makeshift quaffle. But try as they might, their broomsticks will never send them soaring through the air.

The same faux-wizardry charge can’t be levelled at Allen Pan‘s Real-Life Wizard Duel. For when the wand-wielding witches or wizards cast one of four Harry Potter spells, their opponent is struck accordingly… as if by magic.

Real Life Wizard Duel with ELECTRICITY | Sufficiently Advanced

Body shocking wands with speech recognition…It’s indistinguishable from magic! Follow Sufficiently Advanced! https://twitter.com/AnyTechnology https://www.facebook.com/sufficientlyadvanced https://www.instagram.com/sufficientlyadvanced/ Check out redRomina: https://www.youtube.com/user/redRomina Watch our TENS unit challenge! https://youtu.be/Ntovn4N9HNs These peeps helped film, check them out too!

Real spells, real consequences

Harry Potter GIF

Allen uses Transcutaneous Electrical Nerve Stimulation (TENS) machines to deliver the mighty blows to both himself and his opponent, setting off various sticky pads across the body via voice recognition.

The Google Cloud Speech Recognition API recognises one of five spells – Expelliarmus, Stupefy, Tarantallegra, Petrificus Totalus, and Protego – via a microphone plugged into a Raspberry Pi.

Harry Potter GIF

When the spell is pronounced correctly and understood by the Pi, it tells an Arduino to ‘shoot’ the spell out of the wand via an infrared LED. If the infrared receiver attached to the opponent recognises the spell, it sets off the TENS machine to deliver an electric current to the appropriate body part. Expelliarmus, for example, sets off the TENS connected to the arm, while calling out a successful Petrificus Totalus renders the opponent near immobilised as every pad is activated. For a moment’s rest, calling out “Protego” toward your own infrared receiver offers a few moments of protection against all spells aimed in your direction. Phew.

“But people only die in proper duels, you know, with real wizards. The most you and Malfoy’ll be able to do is send sparks at each other. Neither of you knows enough magic to do any real damage. I bet he expected you to refuse, anyway.”
“And what if I wave my wand and nothing happens?”
“Throw it away and punch him on the nose,” Ron suggested.
Harry Potter and the Philosopher’s Stone

Defence Against the Dark Arts

Harry Potter Wizard Duel Raspberry Pi

To prevent abuse of the spells, each one has its own recharge time, with available spells indicated via LEDs on the wand.

In the realm of Harry Potter fan builds, this has to be a favourite. And while visitors to The Wizarding World of Harry Potter may feel the magical effect of reimagined Butterbeer as they wander around Hogsmead, I’d definitely prefer to play Real Life Wizard Duel with Allen Pan.

The post Harry Potter and the Real-Life Wizard Duel appeared first on Raspberry Pi.

Harry Potter and the Real-life Weasley Clock

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/harry-potter-real-life-weasley-clock/

Pat Peters (such a wonderful Marvel-sounding name) recently shared his take on the Weasley Clock, a device that hangs on the wall of The Burrow, the rickety home inhabited by the Weasley family in the Harry Potter series.

Mrs. Weasley glanced at the grandfather clock in the corner. Harry liked this clock. It was completely useless if you wanted to know the time, but otherwise very informative. It had nine golden hands, and each of them was engraved with one of the Weasley family’s names. There were no numerals around the face, but descriptions of where each family member might be. “Home,” “school,” and “work” were there, but there was also “traveling,” “lost,” “hospital,” “prison,” and, in the position where the number twelve would be on a normal clock, “mortal peril.”

The clock in the movie has misplaced “mortal peril”, but aside from that it looks a lot like what we’d imagined from the books.

There’s a reason why more and more Harry Potter-themed builds are appearing online. The small size of devices such as the Raspberry Pi and Arduino allow for a digital ‘brain’ to live within an ordinary object, allowing control over it that you could easily confuse with magic…if you allow yourself to believe in such things.

So with last week’s Real-life Daily Prophet doing so well, it’s only right to share another Harry Potter-inspired project.

Harry Potter Weasley Clock

The clock serves not to tell the time but, rather, to indicate the location of Molly, Arthur and the horde of Weasley children. And using the OwnTracks GPS app for smartphones, Pat’s clock does exactly the same thing.

Pat Peters Weasley Clock Raspberry Pi

Pat has posted the entire build on instructables, allowing every budding witch and wizard (and possibly a curious Muggle or two) the chance to build their own Weasley Clock.

This location clock works through a Raspberry Pi that subscribes to an MQTT broker that our phone’s publish events to. Our phones (running the OwnTracks GPS app) send a message to the broker anytime we cross into or out of one of our waypoints that we have set up in OwnTracks, which then triggers the Raspberry Pi to run a servo that moves the clock hand to show our location.

There are no words for how much we love this. Here at Pi Towers we definitely have a soft spot for Harry Potter-themed builds, so make sure to share your own with us in the comments below, or across our social media channels on Facebook, Twitter, Instagram, YouTube and G+.

The post Harry Potter and the Real-life Weasley Clock appeared first on Raspberry Pi.

Harry Potter and the Real-Life Daily Prophet

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/harry-potter-and-the-real-life-daily-prophet/

Most people would visit The Wizarding World of Harry Potter and bring back a few souvenirs to adorn their shelves. But for Piet Rullens Jr, with a video from his trip to hand, that simply wasn’t enough.

Daily Prophet poster with moving object

Daily Prophet with moving object

Taking to Photoshop, Piet designed a copy of the Daily Prophet, the newspaper from the original book and film series, and included an article about his trip to the Harry Potter theme park.

Within the design I marked an area with the exact size of the Raspberry Pi screen. Next, I plotted the poster on normal paper at 100%, so the marked area still matched the Raspberry Pi screen.

From there, Piet used the design to mark the backing board of a poster frame, allowing him to cut out a hole the size of the 7″ display.

Piet Rullens Harry Potter Poster

The display sits firmly between the lip of the screen and the glass of the frame, secured to the back of the board alongside a Raspberry Pi 3.

Piet Rullens Harry Potter Poster

As the wall behind the poster backs onto a cupboard, Piet was able to drill a small hole for the USB power lead, leaving no unsightly wiring on display after the frame was hung.

Piet Rullens Harry Potter Poster

As for the software?

The software is very simple: I use a small Python script and an Adafruit IR distance sensor to detect if somebody is approaching the poster. If that’s the case, with a simple command I turn on the Raspberry Pi screen and start a H264 movie using Omxplayer. The movie will play for 5 minutes and then I stop the movie and turn off the screen, so it’s not playing 24/7; this saves energy and screen lifetime.

We love this project, in that ‘Oh it’s amazing, but why didn’t I think of this first?’ way that every good maker feels when they see something awesome.

The post Harry Potter and the Real-Life Daily Prophet appeared first on Raspberry Pi.