Tag Archives: raspberry pi 3

Turn a watermelon into a RetroPie games console

via Raspberry Pi

OK Cedrick, we don’t need to know why, but we have to know how you turned a watermelon into a games console.

This has got to be a world first. What started out as a regular RetroPie project has blown up reddit due to the unusual choice of casing for the games console: nearly 50,000 redditors upvoted this build within a week of Cedrick sharing it.

See, we’re not kidding

What’s inside?

  • Raspberry Pi 3
  • Jingo Dot power bank (that yellow thing you can see below)
  • Speakers
  • Buttons
  • Small 1.8″ screen
Cedrick’s giggling really makes this video

Retropie

While this build looks epic, it isn’t too tricky to make. First, Cedrick flashed the RetroPie image onto an SD card, then he wired up a Raspberry Pi’s GPIO pins to the red console buttons, speakers, and the screen.

Cedrick achieved audio output by adding just a few lines of code to the config file, and he downloaded libraries for screen configuration and button input. That’s it! That’s all you need to get a games console up and running.

Cedrick just hanging on the train with his WaterBoy

Now for the messy bit

Cedrick had to gut an entire watermelon before he could start getting all the hardware in place. He power-drilled holes for the buttons to stick through, and a Stanley knife provided the precision he needed to get the right-sized gap for the screen.

A gutted watermelon with gaps cut to fit games console buttons and a screen

Rather than drill even more holes for the speakers, Cedrick stuck them in place inside the watermelon using toothpicks. He did try hot glue first but… yeah. Turns out fruit guts are impervious to glue.

Moisture was going to be a huge problem, so to protect all the hardware from the watermelon’s sticky insides, Cedrick lined it with plastic clingfilm.

Infinite lives

And here’s how you can help: Cedrick is open to any tips as to how to preserve the perishable element of his project: the watermelon. Resin? Vaseline? Time machine? How can he keep the watermelon fresh?

Share your ideas on reddit or YouTube, and remember to subscribe to see more of Cedrick’s maverick making in the wild.

The post Turn a watermelon into a RetroPie games console appeared first on Raspberry Pi.

Raspberry Pi retro player

via Raspberry Pi

We found this project at TeCoEd and we loved the combination of an OLED display housed inside a retro Argus slide viewer. It uses a Raspberry Pi 3 with Python and OpenCV to pull out single frames from a video and write them to the display in real time.​

TeCoEd names this creation the Raspberry Pi Retro Player, or RPRP, or – rather neatly – RP squared. The Argus viewer, he tells us, was a charity-shop find that cost just 50p.  It sat collecting dust for a few years until he came across an OLED setup guide on hackster.io, which inspired the birth of the RPRP.

Timelapse of the build and walk-through of the code

At the heart of the project is a Raspberry Pi 3 which is running a Python program that uses the OpenCV computer vision library.  The code takes a video clip and breaks it down into individual frames. Then it resizes each frame and converts it to black and white, before writing it to the OLED display. The viewer sees the video play in pleasingly retro monochrome on the slide viewer.

Tiny but cute, like us!

TeCoEd ran into some frustrating problems with the OLED display, which, he discovered, uses the SH1106 driver, rather than the standard SH1306 driver that the Adafruit CircuitPython library expects. Many OLED displays use the SH1306 driver, but it turns out that cheaper displays like the one in this project use the SH1106. He has made a video to spare other makers this particular throw-it-all-in-the-bin moment.

Tutorial for using the SH1106 driver for cheap OLED displays

If you’d like to try this build for yourself, here’s all the code and setup advice on GitHub.

Wiring diagram

TeCoEd is, as ever, our favourite kind of maker – the sharing kind! He has collated everything you’ll need to get to grips with OpenCV, connecting the SH1106 OLED screen over I2C, and more. He’s even told us where we can buy the OLED board.

The post Raspberry Pi retro player appeared first on Raspberry Pi.

Mini Raspberry Pi Boston Dynamics–inspired robot

via Raspberry Pi

This is a ‘Spot Micro’ walking quadruped robot running on Raspberry Pi 3B. By building this project, redditor /thetrueonion (aka Mike) wanted to teach themself robotic software development in C++ and Python, get the robot walking, and master velocity and directional control.

Mike was inspired by Spot, one of Boston Dynamics’ robots developed for industry to perform remote operation and autonomous sensing.

What’s it made of?

  • Raspberry Pi 3B
  • Servo control board: PCA9685, controlled via I2C
  • Servos: 12 × PDI-HV5523MG
  • LCD Panel: 16×2 I2C LCD panel
  • Battery: 2s 4000 mAh LiPo, direct connection to power servos
  • UBEC: HKU5 5V/5A ubec, used as 5V voltage regulator to power Raspberry Pi, LCD panel, PCA9685 control board
  • Thingiverse 3D-printed Spot Micro frame

How does it walk?

The mini ‘Spot Micro’ bot rocks a three-axis angle command/body pose control mode via keyboard and can achieve ‘trot gait’ or ‘walk gait’. The former is a four-phase gait with symmetric motion of two legs at a time (like a horse trotting). The latter is an eight-phase gait with one leg swinging at a time and a body shift in between for balance (like humans walking).

Mike breaks down how they got the robot walking, right down to the order the servos need to be connected to the PCA9685 control board, in this extensive walkthrough.

Here’s the code

And yes, this is one of those magical projects with all the code you need stored on GitHub. The software is implemented on a Raspberry Pi 3B running Ubuntu 16.04. It’s composed on C++ and Python nodes in a ROS framework.

What’s next?

Mike isn’t finished yet: they are looking to improve their yellow beast by incorporating a lidar to achieve simple 2D mapping of a room. Also on the list is developing an autonomous motion-planning module to guide the robot to execute a simple task around a sensed 2D environment. And finally, adding a camera or webcam to conduct basic image classification would finesse their creation.

The post Mini Raspberry Pi Boston Dynamics–inspired robot appeared first on Raspberry Pi.

Raspberry Pi prayer reminder clock

via Raspberry Pi

One of our Approved Resellers in the Netherlands, Daniël from Raspberry Store, shared this Raspberry Pi–powered prayer reminder with us. It’s a useful application one of his customers made using a Raspberry Pi purchased from Daniël’s store.

As a Raspberry Pi Official Reseller, I love to see how customers use Raspberry Pi to create innovative products. Spying on bird nests, streaming audio to several locations, using them as a menu in a restaurant, or in a digital signage-solution… just awesome. But a few weeks ago, a customer showed me a new usage of Raspberry Pi: a prayer clock for mosques.

Made by Mawaqit, this is a narrowcasting solution with a Raspberry Pi at its heart and can be used on any browser or smartphone.

Hardware

This project is simple in hardware terms. You just need Raspberry Pi 3 or Raspberry Pi 4, a TV screen, and a HDMI cable.

If you do not have an internet connection, you’ll also need an RTC clock

With the HDMI cable, Raspberry Pi can broadcast the clock — plus other useful info like the weather, or a reminder to silence your phone — on a wall in the mosque. Awesome! So simple, and yet I have not seen a solution like this before, despite Mawaqit’s application now being used in 51 countries and over 4609 mosques. And, last I checked, it has more than 185,000 active users!

How to build it

You’ll need to install the pre-configured system image and flash the mawaqit.xz system image onto your Raspberry Pi’s SD card.

There are then two options: connected and offline. If you set yourself up using the connected option, you’ll be able to remotely control the app from your smartphone or any computer and tablet, which will be synchronised across all the screens connected to Raspberry Pi. You can also send messages and announcements. The latest updates from Mawaqit will install automatically.

That’s a little RTC on the right

If you need to choose the offline option and you’re not able to use the internet at your mosque, it’s important to equip your Raspberry Pi with RTC, because Raspberry Pi can’t keep time by itself.

All the software, bits of command line code, and step-by-step guidance you’ll need are available on this web page.

These figures update on the Mawaqit site

Open source for all

The Mawaqit project is free of charge, and the makers actually prohibit harnessing it for any monetary gain. The makers even created an API for you to create your own extentions — how great is that? So, if you want your own prayer clock for in a mosque, school, or just at home, take a look at Mawaqit.net.

Anyone with the language skills please head to YouTube and provide community translations for this walkthrough video

The post Raspberry Pi prayer reminder clock appeared first on Raspberry Pi.

Who needs vinyl records when you’ve got Raspberry Pi and NFC?

via Raspberry Pi

Redditor Mark Hank missed the tactile experience of vinyl records so he removed the insides of an old Sonos Boost to turn it into a Raspberry Pi- and NFC-powered music player. Yes, this really works:

The Sonos Boost was purchased for just £3 on eBay. Mark pulled all the original insides out of it and repurposed it as what they call a ‘vinyl emulator’ to better replicate the experience of playing records than what a simple touchscreen offers.

The Boost now contains a Raspberry Pi 3A+ and an ACR122U NFC reader, and it plays a specific album, playlist, or radio station when you tap a specific NFC tag on it. It’s teamed with Sonos speakers, and NTAG213 NFC tags. The maker recommends you go with the largest tags you can find, as it will improve read performance; they went with these massive ones.

One of the album covers printed onto thick card

The tags are inside printouts mounted on 1mm thick card (those album cover artwork squares getting chucked at the Sonos in the video), and they’re “super cheap” according to the maker.

You’ll need to install the node-sonos-http-api package on your Raspberry Pi; it’s the basis of the whole back-end of the project. The maker provides full instructions on their original post, including on how to get Spotify up and running on your Raspberry Pi.

The whole setup neatened up

Rather than manually typing HTTP requests into a web browser, the maker wanted to automate the process so that the Raspberry Pi does it when presented with certain stimulus (aka when the NFC reader is triggered). They also walk you through this process in their step-by-step instructions.

How the maker hid the mess under the display table

The entire build cost around £50, and the great thing is that it doesn’t need to sit inside an old Sonos Boost if you don’t want it to. The reader works through modest-width wood, so you can mount it under a counter, install it in a ‘now listening’ stand, whatever — it’s really up to you.

Full instructions are available on hackster.io! And here’s all the code you’ll need, handily stored on GitHub.

The post Who needs vinyl records when you’ve got Raspberry Pi and NFC? appeared first on Raspberry Pi.

(Raspberry) Pi Commander | The MagPi 95

via Raspberry Pi

Adrien Castel’s idea of converting an old electronic toy into a retro games machine was no flight of fancy, as David Crookes discovers

The 1980s was a golden era for imaginative electronic toys. Children would pester their parents for a Tomytronic 3D or a Nintendo Game & Watch. And they would enviously eye anyone who had a Tomy Turnin’ Turbo Dashboard with its promise of replicating the thrill of driving (albeit without the traffic jams).

All of the buttons, other than the joystick, are original to the toy – as are the seven red LED lights

Two years ago, maker Matt Brailsford turned that amazing toy into a fully working Out Run arcade machine and Adrien Castel was smitten. “I loved the fact that he’d upcycled an old toy and created something that could be enjoyed as a grown-up,” he says. “But I wanted to push the simulation a bit further and I thought a flying sim could do the trick.”

“I didn’t want to modify the look of the toy”

Ideas began flying around Adrien’s mind. “I knew what I wanted to achieve so I made an overall plan in my head,” he recalls. First he found the perfect toy: a battery-powered Sky Fighter F-16 tabletop game made by Dival. He then decided to base his build around a Raspberry Pi 3A+. “It’s the perfect hardware for projects like this because of its flexibility,” Adrien says.

Taking off

The toy needed some work. Its original bright red joystick was missing and Adrien knew he’d have to replace the original screen with a TFT LCD. To do this, he 3D-printed a frame to fit the TFT display and he created a smaller base for the replacement joystick. Adrien also changed the microswitches for greater sensitivity but he didn’t go overboard with the changes.

The games can make use of the full screen. Adrien would have liked a larger screen, but the original ratio oddly lay between 4:3 and 16:9, making a bigger display harder to find

“I knew I would have to adapt some parts for the joystick and for the screen, but I didn’t want to modify the look of the toy,” Adrien explains. “To be honest, modifying the toy would have involved some sanding and painting and I was worried that it would ruin the overall effect of the project if it was badly executed.”

A Raspberry Pi 3A+ sits at the heart of the Pi Commander, alongside a mini audio amplifier, and it’s wired up to components within the toy

As such, a challenge was set. “I had to keep most of the original parts such as throttle levers and LEDs and adapt them to the new build,” he says. “This meant getting them to work together with the system and it also meant using the original PCB, getting rid of the components and re-routing the electronics to plug on the GPIOs.”

There were some enhancements. Adrien soldered a PAM8403 3W class-D audio amplifier to Raspberry Pi and this allowed a basic speaker to replace the original for better sound. But there were some compromises too.

The original PCB was used and the electronics were re-routed. All the components need to work between 3.3 to 5V with the lowest possible amperage while fitting into a tight space

“At first I thought the screen could be bigger than the one I used, but the round shape of the cockpit didn’t give much space to fit a screen larger than four inches.” He also believes the project could be improved with a better joystick: “The one I’ve used is a simple two-button arcade stick with a jet fighter look.”

Flying high

By using the retro gaming OS Recalbox (based on EmulationStation and RetroArch), however, he’s been able to perfect the overall feel. “Recalbox allowed me to create a custom front end that matches the look of a jet fighter,” he explains. It also means the Pi Commander plays shoot-’em-up games alongside open-source simulators like FlightGear (flightgear.org). “It’s a lot of fun.”

Read The MagPi for free!

Find more fantastic projects, tutorials, and reviews in The MagPi #93, out now! You can get The MagPi #95 online at our store, or in print from all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our super subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post (Raspberry) Pi Commander | The MagPi 95 appeared first on Raspberry Pi.