Tag Archives: Your Projects

Raspberry Pi ‘WeatherClock’ shows you the hour’s forecast

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-weatherclock-shows-you-the-hours-forecast/

Meet Eli’s WeatherClock, a digital–analogue timepiece that displays the weather at each hour of the day as well as the time. Here’s an example: every day at 3pm, instead of the hour hand just pointing to a number three on the clock’s face, it also points to a visual representation of what the weather is doing. Obviously, Eli’s WeatherClock still tells the time using the standard positions of the hour and minute hands, but it does two jobs in one, and it looks much more interesting than a regular clock.

We agree, she is lovely (sound on for the video will make that make sense)

Detailed forecast

You can also press on every hour position of the watch’s touchscreen display to see more detailed meteorological information, such as temperature and the likelihood of rain. Then once you’ve gotten all the detail you need, you return to the simple analogue resting face to by pressing the centre of the touchscreen.

Weather details view of the weatherclock digital-analogue clock project.
weatherClock can give you more detail if you want it to

Under the hood

The device uses the openWeatherMap API to fetch weather data for your location. It’s a simple build powered by Raspberry Pi Zero W with a Pimoroni 4″ HyperPixel Hi-Res Display providing the user interface. And its slim, pocket-sized design means you can take it with you on your travels.

Inside view of the weatherclock digital-analogue clock project.
Tiny Raspberry Pi Zero W and a Pimoroni 4″ touchscreen fit inside perfectly

We found this creation on The Digital Vagrant‘s YouTube channel. A friend named Eli gave them the idea so the maker named the project after him. The Digital Vagrant liked the idea of being able to quickly check the weather before leaving the house — no need to check a computer or get your phone out of your bag.

Side view of the weatherclock digital-analogue clock project.
Its super slim design makes WeatherClock portable

Want to make your own WeatherClock? The lovely maker has deposited everything you need on GitHub.

The post Raspberry Pi ‘WeatherClock’ shows you the hour’s forecast appeared first on Raspberry Pi.

Raspberry Pi powers weather station in Nepal

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-powers-weather-station-in-nepal/

This Raspberry Pi-powered weather station is a vital tool for Nepalese farmers, who work in remote, changeable conditions, and rely heavily on monitoring the environment.

nepal weather station being built
All the parts had to be low-cost and easy to maintain

It’s hard to forecast the weather in Nepal. Conditions can vary a lot within a small area as the country is so mountainous. Plus, there is no national weather service. This makes life even harder for farmers working in remote villages, but there were a few essentials elements any solution had to have:

  • Low-cost to build
  • Reliable and easy to maintain
  • Solar power operated
  • Could also run on readily available motorcycle batteries when the solar panels don’t get enough sun
nepal weather station on the roof
A simple plastic food containers keeps the hardware safe and dry

How was it made?

The battery-backed solar powered weather station was built by a team lead by Prabesh Sapkota and Binod Kandel from the Robotics Association of Nepal. And they were able to complete the project affordably using Raspberry Pi. Prabesh and his team wrote the software and created a display dashboard in Raspbian Jessie.

nepal weather station hardware insides
The core components put together as a prototype with a breadboard to check everything worked

However, one of the issues they faced was being able to reliably power the Raspberry Pi and Arduino, and that’s where the BitScope Blade Uno came in to play (more on that later).

Weather station sensors measure temperature, barometric pressure, humidity, wind direction and speed, and all of the sensors are connected to the Arduino which records the data and send it to the Raspberry Pi to display on the dashboard.

Full kit list:

nepal weather station in action
Testing out the weather station on the roof

The team is working with an Australian sponsor to run workshops on basic electronics in the hopes of building more of these affordable weather stations for rural schools and remote areas.

What is Bitscope Blade?

This weather station is an inspiring application of element 14’s BitScope Blade. These power and mounting solutions were developed for those working in challenging conditions, making them perfect for remote areas of Nepal without access to reliable power.

Bitscope Blade is a “robust power and mounting solution for the industrial deployment of Raspberry Pi.” You can choose from three editions based upon the number of Raspberry Pi you’ll be using:

  • BitScope Blade Uno (above far left) is a flexible power and mounting solution for one Raspberry Pi and optional HAT. It’s recommended for makers, students and engineers.
  • BitScope Blade Duo (above centre) is a mountable solution for a pair of Raspberry Pi and is ideal for building a stand-alone desktop and server system.
  • BitScope Blade Quattro (above far right) works with four Raspberry Pi and can support the creation of compute clusters, private clouds or build farms.

The post Raspberry Pi powers weather station in Nepal appeared first on Raspberry Pi.

Raspberry Pi makes your retro analogue camera digital

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-makes-your-retro-analogue-camera-digital/

Befinitiv has built a custom film cartridge, using a Raspberry Pi Zero W, that turned their gorgeous old analogue camera into a digital one, and enabled it to take digital photos, videos, and even wirelessly live stream to the Internet.

A quick, simple build video for a smooth-running project

The analogue camera they used in the build was considered state-of-the-art around fifty years ago, but it lives on to capture another day, all thanks to a tiny computer we made just a few years ago.

analogue to digital camera original model hero shot
It’s a beauty

The maker replaced the old-fashioned camera film roll with a digital cartridge housing a tiny Raspberry Pi camera — with the lens removed — and a Raspberry Pi Zero W. The housing was designed to fit in the back of the camera where original photographers would have clipped the film roll in, and then spooled it over.

analogue to digital camera film with raspberry pi stuff in
Designed to fit

Along with the camera and the Raspberry Pi Zero W, the custom-built cartridge also houses a LiPo battery and a DC to DC converter, used to boost the power supply to the Raspberry Pi up to +5V.

analogue to digital camera insides
Teeny tech packed into a teeny space

The whole project took just two hours to complete from start to finish, everything worked first time. Befinitiv had wanted to use the Raspberry Pi High Quality Camera, but space inside the housing was just too tight. Maybe next time? Perhaps they can use one of those giant ancient cameras, where the photographer had to flip a blanket over their head, all while holding a stick in the air with the flash.

analogue to digital camera looking out the window
This old analogue camera is now fully digital

More retro projects from the maker

Fancy more where this retrofit goodness came from? The maker has also upgraded a flip phone from the year 2000. Oh! I just realised the year 2000 was more than 20 years ago. Watch the build video while I go and burn all of my skater boy jeans and slogan t-shirts…

Don’t let your old flip phone die

They also did something weird but cool sounding with this noisy teletype machine. Is it a teletype machine? What’s a teletype machine? I saw a fax machine once..?

I know EXACTLY what a “teletype message” is…

The post Raspberry Pi makes your retro analogue camera digital appeared first on Raspberry Pi.

Mega six-screen cyberdeck

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/mega-six-screen-cyberdeck/

Holy cyberdecks! Redditor Holistech (aka Sören Gebbert) really leaned in to the “more is more” idiom when building this big orange cyberdeck using three Raspberry Pis. Why use just one screen to manipulate enemy cyberware and take down your cyberpunk foes, when you can have six?

six screen cyber deck rear view
Rear view (keep reading for the big reveal)

From four to six

We first came across Sören’s work on hackster.io and we were impressed with what we found, which was this four‑screen creation running Linux Mint on a dual Raspberry Pi setup:

four screen cyberdeck
The first, four-screen, iteration of this project is still impressive

So imagine our surprise when we clicked through to check out Holistech on reddit, only to be confronted with this six‑screen monstrosity of brilliance:

six screen cyberdeck
Level up

He’s only gone and levelled up his original creation already. And before we even had the chance to properly swoon over the original.

Under the hood

Originally, Sören wanted to use Raspberry Pi Zero because they’re tiny and easily hidden away inside projects. He needed more power though, so he went with Raspberry Pi 4 instead.

cyberdecks on a desk
The whole family

Sören 3D-printed the distinctive orange frame. On the back of the rig are openings for a fan for active cooling and a mini control display that shows the CPU temperature and the fan speed.

Six 5.5″ HD resolution screens are the eyes of the project. And everything is powered by hefty 26,000 mAh battery power banks.

Carry on

And it gets even better: this whole multi-screen thing is portable. Yes, portable. You can fold it up, pack it away in its suitably steampunk metal box, and carry it with you.

There are plenty more photos. Head to Instagram to take a closer look at how Sören’s genius design folds in on itself to enable portability.

The post Mega six-screen cyberdeck appeared first on Raspberry Pi.

Charge your Tesla automatically with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/charge-your-tesla-automatically-with-raspberry-pi/

It’s the worst feeling in the world: waking up and realising you forgot to put your electric car on charge overnight. What do you do now? Dig a bike out of the shed? Wait four hours until there’s enough juice in the battery to get you where you need to be? Neither option works if you’re running late. If only there were a way to automate the process, so that when you park up, the charger find its way to the charging port on its own. That would make life so much easier.

This is quite the build

Of course, this is all conjecture, because I drive a car made in the same year I started university. Not even the windows go up and down automatically. But I can dream, and I still love this automatic Tesla charger built with Raspberry Pi.

Wait, don’t Tesla make those already?

Back in 2015 Tesla released a video of their own prototype which can automatically charge their cars. But things have gone quiet, and nothing seems to be coming to market any time soon – nothing directly from Tesla, anyway. And while we like the slightly odd snake-charmer vibes the Tesla prototype gives off, we really like Pat’s commitment to spending hours tinkering in order to automate a 20-second manual job. It’s how we do things around here.

This video makes me feel weird

Electric vehicle enthusiast Andrew Erickson has been keeping up with the prototype’s whereabouts, and discussed it on YouTube in 2020.

How did Pat build his home-made charger?

Tired of waiting on Tesla, Pat took matters into his own hands and developed a home-made solution with Raspberry Pi 4. Our tiny computer is the “brains of everything”, and is mounted to a carriage on Pat’s garage wall.

automatic tesla charger rig mounted on garage wall
The entire rig mounted to Pat’s garage wall

There’s a big servo at the end of the carriage, which rotates the charging arm out when it’s needed. And an ultrasonic distance sensor ensures none of the home-made apparatus hits the car.

automatic tesla charger sensors
Big white thing on the left is the charging arm. Pat pointing to the little green Raspberry Pi camera module up top. And the yellow box at the bottom is the distance sensor

How does the charger find the charging port?

A Raspberry Pi Camera Module takes photos and sends them back to a machine learning model (Pat used TensorFlow Lite) running on his Raspberry Pi 4. This is how the charging arm finds its way to the port. You can watch the model in action from this point in the build video.

automatic tesla charger in action
“Marco!” “Polo!” “Marco!” “Polo!”

Top stuff, Pat. Now I just need to acquire a Tesla from somewhere so I can build one for my own garage. Wait, I don’t have a garage either…

The post Charge your Tesla automatically with Raspberry Pi appeared first on Raspberry Pi.

Collection of Raspberry Pi retro tech projects

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/collection-of-raspberry-pi-retro-tech-projects/

During lockdown, Stuart (aka JamHamster) wanted to keep busy whilst between jobs, and ended up building a mini empire of rescued retro systems. Cassette tapes, Game Boys, and floppy disks were all among the treasures he reclaimed.

All up and running on my 'shelf of deceit' where nothing is what it seems
Stuart calls this the “shelf of deceit” – where nothing is what it appears to be

Cassette tape starter

Stuart got started by fitting a TZXDuino tape loader into a cassette tape shell. Remember those? This allows him to load software onto a ZX Spectrum by inserting a tape into the tape deck, just as Nature intended. He has since improved the design (check out V2 on YouTube) and carefully documented it on GitHub, so people can build their own.

Here’s how the cassette tape project went down

With that first project in the bag and getting attention on a Facebook group (Spectrum for Everyone), Stuart went forth and sourced more retro tech to revive with tiny pieces of new technology.

Twitter lit up for Stuart’s retrofit cassette tape

Enter Raspberry Pi

Then Stuart discovered our tiny computer and realised there was heaps of scope for hiding them inside older tech. Although we can’t quite officially endorse Stuart’s method of “carefully” removing a port on his Raspberry Pi – it’ll void your warranty – we will say that we like people who go about intentionally voiding their warranties. It’s a cool video.

Here's the collection so far and I'm really pleased with how they worked out
You can see all the modern devices labelled alongside the retro tech they’re encased in

He has since created loads of retrofit projects with Raspberry Pi. Let’s take a quick look at a few of them.

Raspberry Pi 3 Game Boy build

Another gem of a build video from JamHamster on YouTube

First up is a Game Boy build with a Raspberry Pi 3 Model A+. Stuart built an aluminium chassis from scrap, and this sandwiches the Raspberry Pi to hold it in place inside the Game Boy enclosure, as well as acting as a heatsink. There’s a grille in the cartridge and he also added four rear buttons. The hardest part of this build, apparently, was soldering the custom HDMI cable.

Better-than-real CRT screen

Stuart liked the look of an old-fashioned CRT (cathode-ray tube) screen for playing retro games on, but they chew through energy and aren’t that portable. So he had the idea to make a space-efficient LCD system that sits on a desktop and just looks like a retro TV.

Wait for the heroes in half-shells at the end

This project features a 3.5-inch screen of the type that’s usually found on a car dashboard to help the driver to reverse. Stuart converted it to 5V, and added a cut-down Raspberry Pi 3 and a custom-machined chassis. A custom-ground curved lens makes it look like a real CRT, and he added ports on the back for two Atari joysticks, as well as an external composite input and USB.

The Pi 'CRT' has two onboard Atari Joystick ports and plenty of connectors for other machines
This Raspberry Pi-powered “CRT” display has two onboard Atari joystick ports and plenty of connectors for other machines

The build process for this project is also documented on Github. Here are some extra pictures.

Sega Game Gear build

Stuart’s sister gave him her Game Gear to fix, but the batteries leaked and killed it so he converted it to a Raspberry Pi 3B portable gaming system. And because it was for his sister, he went all out, spending six weeks refining it.

He also ended up rewriting elements of the Arduino Joystick library for responsiveness and ease of configuration. Here’s the Github link for those interested in that part of the build.

Check out the carnage that Stuart rescued with Raspberry Pi 3B

RetroPie cassette

Stuart’s latest cassette build features a Raspberry Pi Zero running RetroPie. He wanted to make one with a transparent case, so he encased the Raspberry Pi in a heatsink sandwich to hide the wiring. He added a full-size USB port and a 3.5 mm media connector for sound and visuals. Here are some shots of the inside.

I'm really pleased with the 80s green
I love the 80s green

Try new things, expect failure, enjoy the process

There were far too many cracking retro builds for us to list here, so follow Stuart on Twitter @RealJamHamster and subscribe to JamHamster on YouTube to properly check everything out.

They need hefty heatsinks but I like working with metal and had fun with some of the designs
They need hefty heatsinks, but Stuart likes working with metal and had fun with some of the designs

Makers, tinkerers, and crafters don’t always have a practical reason for embarking on projects, and Stuart is no different. Here’s what he had to say about why projects like this make him happy:

“I will be happy to admit that I have no clue what I’m doing most of the time, and I am by no means an expert, but I believe everyone should try new things as you never know what you’ll be good at. 9 out of 10 of my ideas don’t work but that tenth one is generally pretty good. I’ve been between roles during lockdown so I am building these out of scrap metal and whatever I have lying around, which is an extra challenge. My philosophy is to try new things, expect failure, learn to enjoy the process and that it’ll be done when it’s done.”

The post Collection of Raspberry Pi retro tech projects appeared first on Raspberry Pi.

HIIT Pi makes Raspberry Pi your home workout buddy

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/hiit-pi-makes-raspberry-pi-your-home-workout-buddy/

Has your fitness suffered during locked down? Have you been able to keep up diligently with your usual running routine? Maybe you found it easy to recreate you regular gym classes in your lounge with YouTube coaches. Or maybe, like a lot of us, you’ve not felt able to do very much at all, and needed a really big push to keep moving.

From James’s YouTube channel

Maker James Wong took to Raspberry Pi to develop something that would hold him accountable for his daily HIIT workouts, and hopefully keep his workouts on track while alone in lockdown.

What is a HIIT workout?

HIIT is the best kind of exercise, in that it doesn’t last long and it’s effective. You do short bursts of high-intensity physical movement between short, regular rest periods. HIIT stands for High Intensity Interval Training.

James’s model can detect how well you perform a burpee, as well as many other exercise movements

James was attracted to HIIT during lockdown as it didn’t require any gym visits or expensive exercise equipment. He had access to endless online training sessions, but felt he needed that extra level of accountability to make sure he kept up with his at-home fitness regime. Hence, HIIT Pi.

So what does HIIT Pi actually do?

HIIT Pi is a web app that uses machine learning on Raspberry Pi to help track your workout in real time. Users can interact with the app via any web browser running on the same local network as the Raspberry Pi, be that on a laptop, tablet, or smartphone.

HIIT Pi running software on server from ipad using raspberry pi
An iPad accessing a remote server running on James’s Raspberry Pi

HIIT Pi is simple in that it only does two things:

  • Uses computer vision to automatically capture and track detected poses and movement
  • Scores them according to a set of rules and standards
HIIT Pi running on Raspberry Pi and a Raspberry Pi camera module, propped up on a shelf
HIIT Pi is watching you via a Raspberry Pi camera module (top right)

So, essentially, you’ve got a digital personal trainer in the room monitoring your movements and letting you know whether they’re up to standard and whether you’re likely to achieve your fitness goals.

James calls HIIT Pi an “electronic referee”, and we agree that if we had one of those in the room while muddling through a Yoga With Adriene session on YouTube, we would try a LOT harder.

How does it work?

A Raspberry Pi camera module streams raw image data from the sensor roughly at 30 frames per second. James devised a custom recording stream handler that works off this pose estimation model and takes frames from the video stream, spitting out pose confidence scores using pre-set keypoint position coordinates.

HIIT Pi dashboard
HIIT Pi uses Dash, a laudable open source tool from the Plotly team

James’s original project post details the inner workings. You can also grab the code needed to create your own at-home Raspberry Pi personal trainer.

Get in touch with James here.

The post HIIT Pi makes Raspberry Pi your home workout buddy appeared first on Raspberry Pi.

Translate dog barks with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/translate-dog-barks-with-raspberry-pi/

I speak English. Super well. And I can read the rough, overall vibe of writing in French. I can also order beer and taxis in Spanish. Alas, my dog can do none of these things, and we are left in communication limbo. I try asking them (in English) why they’re so mean to that one Cockapoo who lives across the road, or why they don’t understand the importance of the eyedrops the vet insists I have to hold their eyelids open to administer. They just respond with a variety of noises that I cannot translate. We need to fix this, and thankfully NerdStroke has harnessed Raspberry Pi to build a solution.

NerdStroke’s YouTube channel is new, but good. Subscribe to it!
(Video features some bleeped-out strong language, as well as one unbleeped mild swear)

How does it work?

The dog wears a harness with a microphone that picks up its barks. The barks get processed through a device that determines what the dog is saying and then outputs it through speakers.

Raspberry Pi Zero is the affordable brain powering NerdStroke’s solution to this age-old human-and-pup problem. But writing code that could translate the multitude of frequencies coming out of a dog’s mouth when it barks was a trickier problem. NerdStroke tried to work it through on Twitch with fellow hobbyists, but alas, the original dream had to be modified.

dog bark translator hardware
The kit worked fine – it was the coding challenge that changed the course of this project

Spoiler alert: fast Fourier transforms did not work. You would need a clear, pure tone for that to work in a project like this, but as we said above, dogs bark in a rainbow of tones, pitches, and all the rest.

So what’s the solution?

Because of this, a time-based model was devised to predict what a dog is likely to be barking about at any given time of day. For example, if it’s early morning, they probably want to go out to pee. But if it’s mid-morning, they’re probably letting you know the postman has arrived and is trying to challenge your territory by pushing thin paper squares through the flap in your front door. It’s a dangerous world out there, and dogs just want to protect us.

Nerdstroke had his good friend record some appropriate soundbites to go with each bark, depending on what time of day it happened. And now, Nugget the dog can tell you “I want to cuddle” or “Why aren’t you feeding me?”

Same, Nugget, same

While the final project couldn’t quite translate the actual thoughts of a dog, we love the humour behind this halfway solution. And we reckon the product name, Holler Collar, would definitely sell.

Follow NerdStroke’s future projects

NerdStroke is all over the socials, so follow them on your platform of choice:

TWITCH – twitch.tv/nerdstoke
INSTAGRAM – instagram.com/nerdstoke
TWITTER – twitter.com/nerdstoke
GITHUB – github.com/nerdstoke
EMAIL – [email protected]

The post Translate dog barks with Raspberry Pi appeared first on Raspberry Pi.

Make your bike smart with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/make-your-bike-smart-with-raspberry-pi/

Maker keanuDav was always forgetting to turn on his bike lights when riding out in the dark. He also never knew how fast he was going, or how long his rides were. So he created a shareable smart bike that automatically turns the lights on or off and keeps track of where you’ve ridden. The project uses a RFID scanner so somebody else can use the bike without messing with Keanu’s personal ride data.

Here in Cambridge, if you forget to take your clip-on lights off your bike when you lock it up, chances are they won’t be there when you go back. We reckon this Raspberry Pi-powered solution could work for us here in the UK’s leading cycling city too, since there’s nothing to easily unclip and walk away with.

Hardware

  • Raspberry Pi 3
  • GPS NEO 6M (to track speed and location)
  • Portable power battery
  • RFID RC522 (so guest data and Keanu’s data can be separated)
  • LCD screen (so you can see the IP address and display when a user scans in or out)
  • Elegoo Uno R3 Board

Keanu totted up the total price of the build, including wood and the light, at around €145.

How does it all fit together?

We’re not going to lie: the smart bike looks tricky to recreate. I mean, that is a lot of wires. And several bits of hardware. But it does perform multiple functions for the rider, so we can put up with a little fiddliness.

smart bike electrical parts wired up
So many wires. *Rocks back and forth* So many wires.

And don’t worry, Keanu is a hero and shared this Fritzing diagram on his instructable, which is handily set out in a twelve-step format so you can follow along easily.

smart bike fritzing diagram
See, it’s all simple once you know how

How do you collect all the data?

Keanu explains:

“The RFID scanner is used with the arduino. I read out the data from the scanner with the arduino and send it to the Raspberry Pi with Serial USB.

The GPS module is also using serial communication. The data the GPS sends to the Raspberry Pi is not that well formatted, so I used a library to parse the data and make it a lot easier to use.

The analog values from the LDR are converted using the mcp3008 (an adc), then I transform the value to a percentage.”

smart bike data loop

Keanu stores the data in a relational database in mySQL. Then the database and a python script run together on the Raspberry Pi. Here’s everything you need on GitHub.

Take a ride

On top of the impressive coding and electrical skills, Keanu is a dab hand at woodwork. You could use a pre-made box in another material if that’s not your thing. It just needs a hole for the LCD screen to show through.

smart bike parts wired together in the box mount

Make sure to check out maker Keanu’s step-by-step tutorial explaining how he made the smart bike.

The post Make your bike smart with Raspberry Pi appeared first on Raspberry Pi.

Raspberry Pi Zero makes a xylophone play itself

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-zero-makes-a-xylophone-play-itself/

When maker Stéphane (aka HalStar) set about building this self-playing xylophone, their goal was to learn more about robotics, and to get hands-on with some mechanical parts they had never used before, in this case solenoids.

They also wanted to experiment with Raspberry Pi to build something that reflected their love of music. This automated instrument, capable of playing hundreds of MIDI files, fits the brief.

Let me introduce you to Stéphane’s self-playing xylophone

Two factors constrained the design: Stéphane wanted to be able to do it all using parts from the local DIY store, and to use as many regular modules as possible. So, no breadboard or wires everywhere, and no custom PCB. Just something simple to assemble and neat.

This extra video goes into more detail about the build process

Hardware

Raspberry Pi Zero WH is the teeny tiny brain of the self-playing xylophone. And its maker’s build details video very helpfully labels all the parts, where they sit, and what’s connected to what.

self playing xylophone hardware
There we are (#4) working away to make the xylophone play

These three buttons select the tracks, set the tempo, and set the mode. Choose between playing all loaded tracks or just one. You can also decide whether you want all tracks to play on repeat in a loop, or stop after your selections have played through. A two-inch LCD screen shows you what’s going on.

self playing xylophone track selection buttons
Twist and click to choose your settings

The right notes

While there are thousands of MIDI files freely available online, very few of them could actually be played by the xylophone. With only 32 notes, the instrument is limited in what it can play without losing any notes. Also, even when a MIDI file uses just 32 consecutive notes, they might not be the same range of 32 notes as the xylophone has, so you need to transpose. Stéphane developed a tool in Python to filter out 32-note tunes from thousands of MIDI files and automatically transpose them so the xylophone can play them. And, yes, everything you need to copy this filtering and transposing function is on GitHub.

self playing xylophone hero
In all its glory

Now, Stéphane says that whenever friends or family visit their home, they’re curious and impressed to see this strange instrument play by itself. Sadly, we are not among Stéphane’s family or friends; fortunately, though, this project has an entire YouTube playlist, so we can still have a look and a listen to see it in action up close.

Wait, isn’t that a glockenspiel?

We know it’s technically a glockenspiel. Stéphane acknowledges it is technically a glockenspiel. But we are firm fans of their going down the xylophone route, because way more people know what one of those is. If you’re interested, the difference between a xylophone and the glockenspiel is the material used for the bars. A xylophone has wooden bars, whereas glockenspiel bars are metal.

The post Raspberry Pi Zero makes a xylophone play itself appeared first on Raspberry Pi.

Raspberry Pi R2D2 console (plus tons of other Star Wars projects)

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-r2d2-console-plus-tons-of-other-star-wars-projects/

Diehard Nintendo and Star Wars fan electrouser301 is behind this customised R2D2 Raspberry Pi-powered console. Raspberry Pi 3 Model B is its brain, and a Nintendo GameCube was customised with spray paint and hand-cut stencils.

game cube painted to look like R2D2
A match made in a galaxy far, far away

Unleash your inner child

Telling the story of the build, electrouser301 said:

“When I saw what people were doing with Raspberry Pi and emulation it opened up a new world to me. If you would have shown kid-me that I could play the whole libraries of NES, N64, Arcade games, Genesis, SNES, etc. all on one console that you create yourself, to your own specifications, my mind would have been blown. That’s what this whole project was about, bringing back my inner child. I wanted to create and own something that no one else has.”

Inner workings of R2D2 Cube

Of course, you could just deck out a GameCube case with decals or paint and keep the internals the same if you don’t want to swap a Raspberry Pi in for emulation. But where’s the fun in that?

See the machine’s power circuit plugged into the Raspberry Pi’s micro USB power slot below. The red and green wires are LED wires, and the power switch wires are pink.

And here’s a side view of the guts of the project:

R2D2 makeover

Hand-cut R2D2-inspired paper stencils spray-painted onto the GameCube give it its instantly recognisable style. A unique retro device now adorns electrouser301’s gaming space, and new life has been breathed into one of Nintendo’s finest creations.

R2D2-approved blue and white colour scheme

Top Star Wars maker projects

Take a look at electromaker’s list of Best Star Wars Maker Projects – it’s where we came across this R2D2 GameCube mashup. Naturally, the list features a fair few homemade lightsabers, so check it out if you’re in the market for an upgrade; however, we wanted to share a few Star Wars-themed builds we hadn’t seen before.

First up, an animated Star Wars: The Force Awakens movie poster made with NeoPixel LEDs and an Arduino Mega. Steve from Making at Home coded a built-in motion sensor and customisable brightness settings. Check it out below, because this isn’t just any old poster with a few LEDs taped in the back, oh no.

Pimp my poster

You know we love wearable tech around here, so this DIY Boba Fett helmet with a built-in LED chaser was definitely going to be a favourite. This is a fairly affordable build too, consisting of a few cheap components like LEDs and resistors, while the helmet itself is made from crafty stuff found around the house. Crazy Couple created this project and you should check out their tutorial-packed YouTube channel.

“I am Boba Fett. The ship you seek is nearby.”

BB8 occupies a special place in our hearts, so we love this 3D-printed robot, which is controlled by an Arduino Uno over a Bluetooth connection from your smartphone. Watch maker Lewis’s video below and share in his love for this spherical droid.

Check out maker Lewis’ channel DIY Machines

May the force be with you

Drop some links in the comments to show off your Star Wars-themed builds so we can share in your intergalactic wisdom. Then go be friends with Electromaker on YouTube. Because subscribers of them you should be.

The post Raspberry Pi R2D2 console (plus tons of other Star Wars projects) appeared first on Raspberry Pi.

Raspberry Pi thermal camera

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-thermal-camera/

It has been a cold winter for Tom Shaffner, and since he is working from home and leaving the heating on all day, he decided it was finally time to see where his house’s insulation could be improved.

camera attached to raspberry pi in a case
Tom’s setup inside a case with a cooling fan; the camera is taped on bottom right

An affordable solution

His first thought was to get a thermal IR (infrared) camera, but he found the price hasn’t yet come down as much as he’d hoped. They range from several thousand dollars down to a few hundred, with a $50 option just to rent one from a hardware store for 24 hours.

When he saw the $50 option, he realised he could just buy the $60 (£54) MLX90640 Thermal Camera from Pimoroni and attach it to a Raspberry Pi. Tom used a Raspberry Pi 4 for this project. Problem affordably solved.

A joint open source effort

Once Tom’s hardware arrived, he took advantage of the opportunity to combine elements of several other projects that had caught his eye into a single, consolidated Python library that can be downloaded via pip and run both locally and as a web server. Tom thanks Валерий КурышевJoshua Hrisko, and Adrian Rosebrock for their work, on which this solution was partly based.

heat map image showing laptop and computer screen in red with surroundings in bluw
The heat image on the right shows that Tom’s computer and laptop screens are the hottest parts of the room

Tom has also published everything on GitHub for further open source development by any enterprising individuals who are interested in taking this even further.

Quality images

The big question, though, was whether the image quality would be good enough to be of real use. A few years back, the best cheap thermal IR camera had only an 8×8 resolution – not great. The magic of the MLX90640 Thermal Camera is that for the same price the resolution jumps to 24×32, giving each frame 768 different temperature readings.

heat map image showing window in blue and lamp in red
Thermal image showing heat generated by a ceiling lamp but lost through windows

Add a bit of interpolation and image enlargement and the end result gets the job done nicely. Stream the video over your local wireless network, and you can hold the camera in one hand and your phone in the other to use as a screen.

Bonus security feature

Bonus: If you leave the web server running when you’re finished thermal imaging, you’ve got yourself an affordable infrared security camera.

video showing the thermal camera cycling through interpolation and color modes and varying view
Live camera cycling through interpolation and colour modes and varying view

Documentation on the setup, installation, and results are all available on Tom’s GitHub, along with more pictures of what you can expect.

And you can connect with Tom on LinkedIn if you’d like to learn more about this “technically savvy mathematical modeller”.

The post Raspberry Pi thermal camera appeared first on Raspberry Pi.

Raspberry Pi makes LEGO minifigures play their own music

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-makes-lego-minifigures-play-their-own-music/

We shared Dennis Mellican’s overly effective anti-burglary project last month. Now he’s back with something a whole lot more musical and mini.

Inspiration

Dennis was inspired by other jukebox projects that use Raspberry Pi, NFC readers, and tags to make music play. Particularly this one by Mark Hank, which we shared on the blog last year. The video below shows Dennis’s first attempt at creating an NFC Raspberry Pi music player, similar to Mark’s.

LEGO twist

After some poking around, Dennis realised that the LEGO Dimensions toy pad is a three-in-one NFC reader with its own light show. He hooked it up to a Raspberry Pi and developed a Python application to play music when LEGO Dimension Minifigures are placed on the toy pad. So, if an Elvis minifigure is placed on the reader, you’ll hear Elvis’s music.

LEGO figures dressed as member of the band KISS
Mini KISS rocking out on the NFC reader

The Raspberry Pi is hooked up to the LEGO Dimensions toy pad, with Musicfig (Dennis’s name for his creation) playing tracks via Spotify over Bluetooth. The small screen behind the minifigures is displaying the Musicfig web application which, like the Spotify app, displays the album art for the track that’s currently playing. 

No Spotify or LEGO? No problem!

Daft Punk LEGO minifgures stood on an NFC reader next to a Raspberry Pi and a phone showing Daft Punk playing on Spotify
Daft Punk LOVES Raspberry Pi

Spotify playback is optional, as you can use your own MP3 music file collection instead. You also don’t have to use LEGO Minifigures: most NFC-enabled devices or tags can be used, including Disney Infinity, Nintendo Amiibo, and Skylander toy characters.

Mini figurines in the shape of various kids film charactera
Why not have Elsa sing… what’s that song again? Let it… what was it?

Dennis thought Musicfig could be a great marketable LEGO product for kids and grown-ups alike, and and he submitted it to the LEGO Ideas website. Unfortunately, he had tinkered a little too much (we approve) and it wasn’t accepted, due to rules that don’t allow non-LEGO parts or customisations.

Want to build one?

The LEGO Dimensions toy pad was discontinued in 2017, but Dennis has seen some sets on sale at a few department stores, and even more cheaply on second-hand market sites like Bricklink. We’ve spotted them on eBay and Amazon too. Dennis also advises that the toy pad often sells for less than a dedicated NFC reader.

A Tron mini figure on the reader with the Tron movie soundtrack seen playing on the screen behind it
What’s the best movie soundtrack and why is it Tron?

Watch Dennis’s seven-year-old son Benny show you how it all works, from Elvis through to Prodigy via Daft Punk and Queen.

You can tell which songs Benny likes best because the volume goes to 11

There are some really simple step-by-step instructions for a quick install here, as well as a larger gallery of Musicfig rigs. And Dennis hosts a more detailed walkthrough of the project, plus code examples, here.

You can find all things Dennis-related, including previous Raspberry Pi projects, here.

The post Raspberry Pi makes LEGO minifigures play their own music appeared first on Raspberry Pi.

Coding on Raspberry Pi remotely with Visual Studio Code

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/coding-on-raspberry-pi-remotely-with-visual-studio-code/

Jim Bennett from Microsoft, who showed you all how to get Visual Studio Code up and running on Raspberry Pi last week, is back to explain how to use VS Code for remote development on a headless Raspberry Pi.

Like a lot of Raspberry Pi users, I like to run my Raspberry Pi as a ‘headless’ device to control various electronics – such as a busy light to let my family know I’m in meetings, or my IoT powered ugly sweater.

The upside of headless is that my Raspberry Pi can be anywhere, not tied to a monitor, keyboard and mouse. The downside is programming and debugging it – do you plug your Raspberry Pi into a monitor and run the full Raspberry Pi OS desktop, or do you use Raspberry Pi OS Lite and try to program and debug over SSH using the command line? Or is there a better way?

Remote development with VS Code to the rescue

There is a better way – using Visual Studio Code remote development! Visual Studio Code, or VS Code, is a free, open source, developer’s text editor with a whole swathe of extensions to support you coding in multiple languages, and provide tools to support your development. I practically live day to day in VS Code: whether I’m writing blog posts, documentation or Python code, or programming microcontrollers, it’s my work ‘home’. You can run VS Code on Windows, macOS, and of course on a Raspberry Pi.

One of the extensions that helps here is the Remote SSH extension, part of a pack of remote development extensions. This extension allows you to connect to a remote device over SSH, and run VS Code as if you were running on that remote device. You see the remote file system, the VS Code terminal runs on the remote device, and you access the remote device’s hardware. When you are debugging, the debug session runs on the remote device, but VS Code runs on the host machine.

Photograph of Raspberry Pi 4
Raspberry Pi 4

For example – I can run VS Code on my MacBook Pro, and connect remotely to a Raspberry Pi 4 that is running headless. I can access the Raspberry Pi file system, run commands on a terminal connected to it, access whatever hardware my Raspberry Pi has, and debug on it.

Remote SSH needs a Raspberry Pi 3 or 4. It is not supported on older Raspberry Pis, or on Raspberry Pi Zero.

Set up remote development on Raspberry Pi

For remote development, your Raspberry Pi needs to be connected to your network either by ethernet or WiFi, and have SSH enabled. The Raspberry Pi documentation has a great article on setting up a headless Raspberry Pi if you don’t already know how to do this.

You also need to know either the IP address of the Raspberry Pi, or its hostname. If you don’t know how to do this, it is also covered in the Raspberry Pi documentation.

Connect to the Raspberry Pi from VS Code

Once the Raspberry Pi is set up, you can connect from VS Code on your Mac or PC.

First make sure you have VS Code installed. If not, you can install it from the VS Code downloads page.

From inside VS Code, you will need to install the Remote SSH extension. Select the Extensions tab from the sidebar menu, then search for Remote development. Select the Remote Development extension, and select the Install button.

Next you can connect to your Raspberry Pi. Launch the VS Code command palette using Ctrl+Shift+P on Linux or Windows, or Cmd+Shift+P on macOS. Search for and select Remote SSH: Connect current window to host (there’s also a connect to host option that will create a new window).

Enter the SSH connection details, using [email protected]. For the user, enter the Raspberry Pi username (the default is pi). For the host, enter the IP address of the Raspberry Pi, or the hostname. The hostname needs to end with .local, so if you are using the default hostname of raspberrypi, enter raspberrypi.local.

The .local syntax is supported on macOS and the latest versions of Windows or Linux. If it doesn’t work for you then you can install additional software locally to add support. On Linux, install Avahi using the command sudo apt-get install avahi-daemon. On Windows, install either Bonjour Print Services for Windows, or iTunes for Windows.

For example, to connect to my Raspberry Pi 400 with a hostname of pi-400 using the default pi user, I enter [email protected].

The first time you connect, it will validate the fingerprint to ensure you are connecting to the correct host. Select Continue from this dialog.

Enter your Raspberry Pi’s password when promoted. The default is raspberry, but you should have changed this (really, you should!).

VS Code will then install the relevant tools on the Raspberry Pi and configure the remote SSH connection.

Code!

You will now be all set up and ready to code on your Raspberry Pi. Start by opening a folder or cloning a git repository and away you go coding, debugging and deploying your applications.

In the remote session, not all extensions you have installed locally will be available remotely. Any extensions that change the behavior of VS Code as an application, such as themes or tools for managing cloud resources, will be available.

Things like language packs and other programming tools are not installed in the remote session, so you’ll need to re-install them. When you install these extensions, you’ll see the Install button has changed to Install in SSH:< hostname > to show it’s being installed remotely.

VS Code may seem daunting at first – it’s a powerful tool with a huge range of extensions. The good news is Microsoft has you covered with lots of hands-on, self-guided learning guides on how to use it with different languages and development tools, from using Git version control, to developing web applications. There’s even a guide to learning Python basics with Wonder Woman!

Jim with his arms folded wearing a dark t shirt
Jim Bennett

You remember Jim – his blog Expecting Someone Geekier is well good. You can find him on Twitter @jimbobbennett and on github.

The post Coding on Raspberry Pi remotely with Visual Studio Code appeared first on Raspberry Pi.

Check beer stock with Keg Punk on Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/check-beer-stock-with-keg-punk-on-raspberry-pi/

Do you remember the Danger Shed? New Orleans-based Raspberry Pi-powered home brewing monitoring set up in a… shed? Well, Patrick Murphy and his brewing crew are back with a new toy.

How does it work?

What is it?

It’s called Keg Punk – inventory software written in Python, specifically for running on Raspberry Pi and the 7″ Raspberry Pi Touch Display. You mount the touchscreen station in a convenient place and run the program on an embedded Raspberry Pi 4.

keg punk interface
Nice clean interface

Keg Punk is written in Python and is about 2500 lines of code. Since the program is small with a simple interface, it runs on anything from Raspberry Pi Zero to Raspberry Pi 4.

Who needs it?

As a manager at a local craft brewery, Patrick hated not knowing (or not being able to remember) how many kegs of each beer were left in the cellar.

So he started developing a cellar inventory program with the intention of being able to run it within arm’s reach of the beer taps.

Raspberry Pi seven inch touch screen running Keg Punk software
Small enough to sit discreetly next to the beer taps behind the bar

The station needed to have a touchscreen and be tough enough to cope with harsh environments (beer gets EVERYWHERE). Raspberry Pi is the perfect platform for the job as it’s small and easy to connect a touchscreen to.

It can be mounted discreetly close to workstations, so bartenders can quickly see how much stock is left without needing to go down to the cellar.

Keg Punk Raspberry Pi inside the screen casing
Everything fits neatly behind the Raspberry Pi Touch Display

While requirements in a professional setting inspired the idea of Keg Punk, it was developed with the home brewer in mind. The touchscreen station can easily be mounted to a kegerator (a portmanteau of keg and refrigerator) and the tap display can be configured to your setup.

Three installation options

One of the things the Danger Shed team admire most about Raspberry Pi users is their willingness to do a little hands-on tinkering. With that in mind, they launched Keg Punk in three packages, so you can choose an option based on how much of that you’d like to do:

keg punk full kit ready to be shipped
The Taproom Package

The Taproom Package: This is a full plug-in-and-go setup for those who don’t have a Raspberry Pi or who simply do not have time to tinker while also running a bar.

a raspberry pi 4 next to an s d card being held

Keg Punk pre-loaded SD card: Perfect for beer slingers who already have a Raspberry Pi but don’t want to install on their current SD card or deal with the hassle of installation.

Keg Punk software only: If you already have a Raspberry Pi and don’t mind a fair bit of tinkering, you can download the Keg Punk software and manually install.

The post Check beer stock with Keg Punk on Raspberry Pi appeared first on Raspberry Pi.

Visual Studio Code comes to Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/visual-studio-code-comes-to-raspberry-pi/

Microsoft’s Visual Studio Code is an excellent C development environment, and now it’s an easy install on Raspberry Pi. Here’s Jim Bennett from Microsoft to show you all how to get VS Code up and running on our tiny computer. Take it away, Jim…

There are a few products in the tech sphere that get me really excited. One of them is Raspberry Pi (obviously), and the other is Visual Studio Code or VS Code. I always hoped that the two would come together one day — and now, to my great pleasure, they have!

VS Code is a free, open source developer text editor originally released for Windows, macOS and x64 Linux. Out of the box it supports generic text editing and git source code control, as well as full web development with JavaScript, TypeScript and Node.js, with debugging, intellisense and all the goodness you’d expect from a full-featured IDE. What makes it super powerful is extensions — bringing a huge range of programming languages, developer tools and other capabilities.

For example my VS Code setup includes a Python extension so I can code and debug in Python, a set of Microsoft Azure extensions so I can manage my cloud services, PlatformIO to allow me to program micro-controllers like Arduino boards coupled with a C++ extension to support coding in C and C++, and even some Docker support. Not a bad setup for a completely free developer tool.

Jim’s Raspberry Pi 400 running VS Code

I’ve been hoping for years VS Code would come to Raspberry Pi, and finally it’s here. As well as supporting Debian Linux on x64, there are now builds for ARM and ARM64 – both of which can run on Raspberry Pi OS (the ARM build on Raspberry Pi OS, the ARM64 on the beta of the 64-bit Raspberry Pi OS). And yes — I am writing this right now on a Raspberry Pi 400 running VS Code!

Why am I so excited about this?

Well, there are a couple of reasons.

Firstly, it brings an exceptional developer tool to Raspberry Pi. There are already some great editors, but nothing of the calibre of VS Code. I can take my $35 computer, plug it into a keyboard and mouse, connect a monitor and a TV and code in a wide range of languages from the same place.

I see kids learning Python at school using one tool, then learning web development in an after-school coding club with a different tool. They can now do both in the same application, reducing the cognitive load – they only have to learn one tool, one debugger, one setup. Combine this with the new Raspberry Pi 400 and you have an all-in-one solution to learning to code, reminiscent of my ZX Spectrum of decades ago, but so much more powerful.

The second reason is to me the most important — it allows kids to share the same development environment as their grown-ups. Imagine the joy of a 10-year-old coding Python using VS Code on their Raspberry Pi plugged into the family TV, then seeing their Mum working from home coding Python in exactly the same tool on her work laptop as part of her job as an AI engineer or data scientist. It also makes it easier when Mum has to inevitably help with unblocking the issues that always come up with learners.

As a young child it was mind-blowing when my Dad brought home a work PC so he could write reports and I could use it to write up my school work – I was using what Dad used at work, making me feel important. I see this with my seven-year-old daughter, seeing her excitement that I use Microsoft Teams for work, the same as she uses for her virtual schooling (she’s even offered to teach me how to use it if I get stuck). To be able to bring that unadulterated joy of using ‘grown-up tools’ to our young learners is priceless.

Installing VS Code

The great news is VS Code is now available as part of the Raspberry Pi OS apt packages. Launch the Raspberry Pi Terminal and run the following commands:

sudo apt update 
sudo apt install code -y

This will download and install VS Code. If you’ve got your hands on a Pico, then you may not even need to do this – VS Code is installed as part of the Pico setup from the Getting Started guide.

After installing VS Code, you can run it from the Programming folder in the Raspberry Pi menu.

Getting started with VS Code

VS Code may seem daunting at first – it’s a powerful tool with a huge range of extensions. The good news is Microsoft has you covered with lots of hands-on, self-guided learning guides on how to use it with different languages and development tools, from using Git version control, to developing web applications — there’s even a guide to learning Python basics with Wonder Woman.

Go grab it and happy coding!

Jim with his arms folded wearing a dark t shirt
There he is – that’s the real life Jim!

Brilliant Jim Bennett shares loads of Raspberry Pi builds and tutorials over on Expecting Someone Geekier and tweets @jimbobbennett. He also works in Developer Relations at Microsoft. You can learn pretty much everything there is to know about him on github.

The post Visual Studio Code comes to Raspberry Pi appeared first on Raspberry Pi.

Raspberry Pi LEGO sorter

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-lego-sorter/

Raspberry Pi is at the heart of this AI–powered, automated sorting machine that is capable of recognising and sorting any LEGO brick.

And its maker Daniel West believes it to be the first of its kind in the world!

Best ever

This mega-machine was two years in the making and is a LEGO creation itself, built from over 10,000 LEGO bricks.

A beast of 10,000 bricks

It can sort any LEGO brick you place in its input bucket into one of 18 output buckets, at the rate of one brick every two seconds.

While Daniel was inspired by previous LEGO sorters, his creation is a huge step up from them: it can recognise absolutely every LEGO brick ever created, even bricks it has never seen before. Hence the ‘universal’ in the name ‘universal LEGO sorting machine’.

Hardware

There we are, tucked away, just doing our job

Software

The artificial intelligence algorithm behind the LEGO sorting is a convolutional neural network, the go-to for image classification.

What makes Daniel’s project a ‘world first’ is that he trained his classifier using 3D model images of LEGO bricks, which is how the machine can classify absolutely any LEGO brick it’s faced with, even if it has never seen it in real life before.

We LOVE a thorough project video, and we love TWO of them even more

Daniel has made a whole extra video (above) explaining how the AI in this project works. He shouts out all the open source software he used to run the Raspberry Pi Camera Module and access 3D training images etc. at this point in the video.

LEGO brick separation

The vibration plate in action, feeding single parts into the scanner

Daniel needed the input bucket to carefully pick out a single LEGO brick from the mass he chucks in at once.

This is achieved with a primary and secondary belt slowly pushing parts onto a vibration plate. The vibration plate uses a super fast LEGO motor to shake the bricks around so they aren’t sitting on top of each other when they reach the scanner.

Scanning and sorting

A side view of the LEFO sorting machine showing a large white chute built from LEGO bricks
The underside of the beast

A Raspberry Pi Camera Module captures video of each brick, which Raspberry Pi 3 Model B+ then processes and wirelessly sends to a more powerful computer able to run the neural network that classifies the parts.

The classification decision is then sent back to the sorting machine so it can spit the brick, using a series of servo-controlled gates, into the right output bucket.

Extra-credit homework

A front view of the LEGO sorter with the sorting boxes visible underneath
In all its bricky beauty, with the 18 output buckets visible at the bottom

Daniel is such a boss maker that he wrote not one, but two further reading articles for those of you who want to deep-dive into this mega LEGO creation:

The post Raspberry Pi LEGO sorter appeared first on Raspberry Pi.

Deter burglars with a Raspberry Pi chatbot

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/deter-burglars-with-a-raspberry-pi-chatbot/

How to improve upon the standard burglar deterring method of leaving lights switched on? Dennis Mellican turned to Raspberry Pi for a much more effective solution. It actually proved too effective when a neighbour stopped by, but more on that in a bit.

Here you can see Dennis’s system in action scaring off a trespasser:

Good job, Raspberry Pi chatbots!

The burglar deterrent started out as Dennis’s regular home automation system. Not content with the current software offerings, and having worked in DevOps, Dennis decided to create his own solution. Enter Raspberry Pi (well, several of them).

Chatterboxes

Dennis has multiple Raspberry Pi–powered devices dotted around his home, doing things such as turning on lights, powering up a garden sprinkler, and playing fake dog barks on wireless speakers. All these burglar deterrents work together and are run by a chat bot.

A simulation of the chatbots responding to Dennis’ commands

Each Raspberry Pi controls a single automated item in Dennis’s home. All the Raspberry Pis communicate with each other via Slack. Dennis issues commands if he, for example, wants lights to turn on while he is away, but the Raspberry Pis can also talk to each other when a trigger event occurs, such as when a motion sensor is tripped.

Smart sound

speaker, chromecast device, cctv camera and the Raspberry Pi connected for the anti burglary chatbot
Speaker, Google Chromecast, CCTV camera and Raspberry Pi

Google Chromecast enables ‘dumb’ speakers to be smart. Dennis has such speakers set up inside, close to windows at the front and back of the house, and they play an .mp3 file of a fake dog bark when commanded.

The security cameras Dennis uses in his home setup are a wireless CCTV variety, and the lights are a mix of TP-Link and Lifx smart bulbs.

Here’s all the Python code running Dennis’ entire security system.

Too effective?

Dennis’s smart system has backfired on him a few times. Once a neighbour visited while he was out and thought Dennis was rudely not answering the door, because she saw the lights go on inside, making it appear like he was home. Awkward.

The fake dog barking has also startled the postman and a few joggers — Dennis says it adds to the realism.

You’re cute, but you wreck stuff, so get out

The troupe of Raspberry Pis has also scared away an Australian possum (video above). These critters are notorious for making nests in roof cavities, so Dennis dodged another problematic home invasion there.

Future upgrades

Dennis is a maker after our own hearts when explaining where he’d like to go next with his anti-burglary build:

“I feel like Kevin McCallister from Home Alone, with these home security ‘traps’. I’m still waiting to catch the Wet Bandits for the sequel to this story. So far only stray cats have been caught by the sprinkler. Perhaps the next adventure of the chat bot is to order pizza and have Gangster ‘Johnny’ complete the transaction when the pizza delivery triggers the sensors.”

Go for it, Dennis!

The post Deter burglars with a Raspberry Pi chatbot appeared first on Raspberry Pi.

RetroPie booze barrel

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/retropie-booze-barrel/

What do we want? Retro gaming, adult beverages, and our favourite Spotify playlist. When do we want them? All at the same time.

Luckily, u/breadtangle took to reddit to answer our rum-soaked prayers with this beautifully crafted beer barrel-cum-arcade machine-cum-drinks cabinet.

A beer barrel with drinks inside two opening doors cut into the front of the barrel and a retro arcade console serving as the lid of the barrel with joystick and buttons on a ledge in front
We approve of this drink selection

The addition of a sneaky hiding spot for your favourite tipple, plus a musical surprise, set this build apart from the popular barrel arcade projects we’ve seen before, like this one featured a few years back on the blog.

Retro gaming

A Raspberry Pi 3 Model B+ runs RetroPie, offering all sorts of classic games to entertain you while you sample from the grownup goodies hidden away in the drinks cabinet.

The maker’s top choice is Tetris Attack for the SNES.

A beer barrel with drinks inside two opening doors cut into the front of the barrel and a retro arcade console serving as the lid of the barrel with joystick and buttons on a ledge in front
Such a beautiful finish

Background music

What more could you want now you’ve got retro games and an elegantly hidden drinks cabinet at your fingertips? u/breadtangle‘s creation has another trick hidden inside its smooth wooden curves.

The Raspberry Pi computer used in this build also runs Raspotify, a Spotify Connect client for Raspberry Pi that allows you to stream your favourite tunes and playlists from your phone while you game.

You can set Raspotify to play via Bluetooth speakers, but if you’re using regular speakers and are after a quick install, whack this command in your Terminal:

curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
Booze barrel joystick and buttons panel during the making process
Behind the scenes

u/breadtangle neatly tucked a pair of Logitech z506 speakers on the sides of the barrel, where they could be protected by the overhang of the glass screen cover.

Hardware

The build’s joysticks and buttons came from Amazon, and they’re set into an off-cut piece of kitchen countertop. The glass screen protector is another Amazon find and sits on a rubber car-door edge protector.

The screen itself is lovingly tilted towards the controls, to keep players’ necks comfortable, and u/breadtangle finished off the build’s look with a barstool to sit on while gaming.

We love it, but we have one very important question left…

Can we come round and play?

The post RetroPie booze barrel appeared first on Raspberry Pi.

Get VMWare on Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/get-vmware-on-raspberry-pi/

Hacking apart a sweet, innocent Raspberry Pi – who would do such a thing? Network Chuck, that’s who. But he has a very cool reason for it so, we’ll let him off the hook.

Subscribe to Network Chuck on YouTube

He’s figured out how to install VMware ESXi on Raspberry Pi, and he’s sharing the step-by-step process with you because he loves you. And us. We think. We hope.

Get cutting

In a nutshell, Chuck hacks apart a Raspberry Pi, turning it into three separate computers, each running different software at the same time. He’s a wizard.

Our poor sweet baby 😮

VMware is cool because it’s Virtual Machine software big companies use on huge servers, but you can deploy it on one of our tiny devices and learn how to use it in the comfort of your own home if you follow Chuck’s instructions.

Raspberry Pi cut into three pieces with labels showing how powerful each bit is and what it's capable of
Useful labels explaining which bit of Raspberry Pi is capable of what

What do you need?

Make sure you’re up to date

So easy, it only takes 40 seconds to explain

Firstly, you need to make sure you’re running the latest version of Raspberry Pi OS. Chuck uses Raspberry Pi Imager to do this, and the video above shows you how to do the same.

Format your SD card

Network Chuck removing SD card from Raspberry Pi 4
It’s teeny, but powerful

Then you’ll need to format your SD card ready for VMware ESXi. This can be done with Raspberry Pi Imager too. You’ll need to download these two things:

Chuck is the kind of good egg who walks you through how to do this on screen at this point in the project video.

VMware installation

Then you’ll need to create the VMWare Installer to install the actual software. It’s at this point your USB flash drive takes centre stage. Here’s everything you’ll need:

And this is the point in the video at which Chuck walks you through the process.

Once that’s all done, stick your USB flash drive into your Raspberry Pi and get going. You need to be quick off the mark for this bit – there’s some urgent Escape key pressing required, but don’t worry, Chuck walks you through everything.

Create a VM and expand your storage

Once you’ve followed all those steps, you will be up, running, and ready to go. The installation process only takes up the first 15 minutes of Chuck’s project video, and he spends the rest of his time walking you through creating your first VM and adding more storage.

Top job, Chuck.

Keep up with Chuck

Network Chuck holding a Raspberry Pi 4 next to his broadcasting microphone
Fun fact: Raspberry Pi 4 is the same length as Network Chuck’s beard

Network Chuck live-streams every Monday on his YouTube channel, and you can follow him on Twitter too.

There’s also the brilliant networkchuck.com.

The post Get VMWare on Raspberry Pi appeared first on Raspberry Pi.