Raspberry Pi Blog

This is the official Raspberry Pi blog for news and updates from the Raspberry Pi Foundation, education initiatives, community projects and more!

Chat to Ada Lovelace via a Raspberry Pi

Our friends, 8 Bits and a Byte, have built a Historic Voicebot, allowing users to chat to their favourite historical figures.

It’s rather marvellous.

The Historic Voicebot

Have a chat with your favourite person from the past with the Historic Voicebot! With this interactive installation, you can talk to a historical figure through both chat and voice. Made using Dialogflow, Node.js, HTML Canvas, an AIY Voice Kit, a Raspberry Pi and a vintage phone.

All the skills

Coding? Check. Woodwork? Check. Tearing apart a Google AIY Kit in order to retrofit it into a vintage telephone while ensuring it can still pick up voice via the handset? Check, check, check – this project has it all.

The concept consists of two parts:

  • A touchscreen with animations of a historical figure. The touchscreen also displays the dialog and has buttons so people can ask an FAQ.
  • A physical phone that captures speech and gives audio output, so it can be used to ask questions and listen to the answer.

While Nicole doesn’t go into full detail in the video, the Ada animation uses Dialogflow, Node.js, and HTML Canvas to work, and pairs up with the existing tech in the Google AIY Kit.

And, if you don’t have an AIY Kit to hand, don’t worry; you can have the same functionality using a standard USB speaker and microphone, and Google Home running on a Raspberry Pi.

You can find a tutorial for the whole project on hackster.io.

Follow 8 Bits and a Byte

There are a lot of YouTube channels out there that don’t have the follow count we reckon they deserve, and 8 Bits and a Byte is one of them. So, head to their channel and click that subscribe button, and be sure to check out their other videos for some more Raspberry Pi goodness.

1 Comment

An in-flight entertainment system that isn’t terrible

No Alex today; she’s tragically germ-ridden and sighing weakly beneath a heap of duvets on her sofa. But, in spite of it all, she’s managed to communicate that I should share Kyle‘s Raspberry Pi in-flight entertainment system with you.

I made my own IN-FLIGHT entertainment system! ft. Raspberry Pi

Corsair Ironclaw RGB Gaming Mouse: http://bit.ly/2vFwYw5 From poor A/V quality to lackluster content selection, in-flight entertainment centers are full of compromises. Let’s create our own using a Raspberry Pi 3 B+!

Kyle is far from impressed with the in-flight entertainment on most planes: the audio is terrible, the touchscreens are annoyingly temperamental, and the movie selection is often frustratingly limited. So, the night before a morning flight to visit family (congrats on becoming an uncle, Kyle! We trust you’ll use your powers only for good!), he hit upon the idea of building his own in-flight entertainment system, using stuff he already had lying around.

Yes, we know, he could just have taken a tablet with him. But we agree with him that his solution is way funner. It’s way more customisable too. Kyle’s current rushed prototype features a Raspberry Pi 3B+ neatly cable-tied into a drilled Altoids tin lid, which is fixed flush to the back of a 13.3-inch portable monitor with adhesive Velcro. He’s using VLC Media Player, which comes with Raspbian and supports a lot of media control functions straight out of the box; this made using his mouse and mini keyboard a fairly seamless experience. And a handy magnetic/suction bracket lets him put the screen in the back of the seat in front to the best possible use: as a mounting surface.

As Kyle says, “Is it ridiculous? I mean, yes, obviously it’s ridiculous, but would you ever consider doing something like this?”

6 Comments

Remembering Andy Baker

We are immensely sad to learn of the death, on 1 June, of Andy Baker, joint founder and organiser of the brilliant Cotswold Raspberry Jam. Andy had been suffering from brain cancer.

andy baker pistuffing

Together with co-founder Andrew Oakley, Andy worked incredibly hard to make the Cotswold Jam one of the most exciting Jams of all, with over 150 people of all ages attending its most popular events. He started working with Raspberry Pis back in 2012, and developed a seriously impressive degree of technical expertise: among his projects were a series of Pi-powered quadcopters, no less, including an autonomous drone. Many of us will forever associate Andy with a memorably fiery incident at the Raspberry Pi Big Birthday Weekend in 2016, which he handled with grace and good humour that eludes most of us:

Raspberry Pi Party Autonomous drone demo + fire

At the Raspberry Pi IV party and there is a great demo of an Autonomous drone which is very impressive with only using a Pi. However it caught on fire. But i believe it does actually work.

Andy maintained his involvement with the Raspberry Pi community, and especially the Cotswold Jam, for several years while living with a brain tumour, and shared his skills and enthusiasm with hundreds of others. He was at the heart of the Raspberry Pi community. When our patron, His Royal Highness the Duke of York, kindly hosted a reception at St. James’s Palace in October 2016 to recognise the Raspberry Pi community, Andy joined us to celebrate in style:

Cotswold Jam on Twitter

@ben_nuttall @DougGore @PiStuffing @rjam_chat Cheers, Ben! Fab photo of Prince Andrew being ignored by @davejavupride & Andy Baker @PiStuffing who are too busy drinking… “It’s what he would have wanted…” :-) https://t.co/FK7sk1CoDs

Andy suggested that, if people would like to make a donation in his name, they support his local school’s IT department, somewhere else he used to volunteer. The department isn’t able to accept online donations, but cheques in pounds sterling can be made out to “Gloucestershire County Council” and posted to a local funeral director who will collect and forward them:

Andy Baker memorial fund
c/o Blackwells of Cricklade
Thames House
Thames Lane
Cricklade
SN6 6BH

We owe Andy immense gratitude for all his work to help people learn and have a great time with Raspberry Pi. We were very lucky indeed to have him as part of our community. We will miss him.

10 Comments

Playback your favourite records with Plynth

Use album artwork to trigger playback of your favourite music with Plynth, the Raspberry Pi–powered, camera-enhanced record stand.

Plynth Demo

This is “Plynth Demo” by Plynth on Vimeo, the home for high quality videos and the people who love them.

Record playback with Plynth

Plynth uses a Raspberry Pi and Pi Camera Module to identify cover artwork and play the respective album on your sound system, via your preferred streaming service or digital library.

As the project’s website explains, using Plynth is pretty simple. Just:

  • Place a n LP, CD, tape, VHS, DVD, piece of artwork – anything, really – onto Plynth
  • Plynth uses its built-in camera to scan and identify the work
  • Plynth starts streaming your music on your connected speakers or home stereo system

As for Plynth’s innards? The stand houses a Raspberry Pi 3B+ and Camera Module, and relies on “a combination of the Google Vision API and OpenCV, which is great because there’s a lot of documentation online for both of them”, states the project creator, Jono Matusky, on Reddit.

Other uses

Some of you may wonder why you wouldn’t have your records with your record player and, as such, use that record player to play those records. If you are one of these people, then consider, for example, the beautiful Damien Rice LP I own that tragically broke during a recent house move. While I can no longer play the LP, its artwork is still worthy of a place on my record shelf, and with Plynth I can still play the album as well.

In addition, instead of album artwork to play an album, you could use photographs, doodles, or type to play curated playlists, or, as mentioned on the website, DVDs to play the movies soundtrack, or CDs to correctly select the right disc in a disc changer.

Convinced or not, I think what we can all agree on is that Plynth is a good-looking bit of kit, and at Pi Towers look forward to seeing where they project leads.

1 Comment

Ghost-hunting in schools with Raspberry Pi | Hello World #9

In Hello World issue 9, out today, Elliott Hall and Tom Bowtell discuss The Digital Ghost Hunt: an immersive theatre and augmented reality experience that takes a narrative-driven approach in order to make digital education accessible.The Digital Ghost Hunt - Raspberry Pi Hello World

The Digital Ghost Hunt combines coding education, augmented reality, and live performance to create an immersive storytelling experience. It begins when a normal school assembly is disrupted by the unscheduled arrival of Deputy Undersecretary Quill of the Ministry of Real Paranormal Hygiene, there to recruit students into the Department’s Ghost Removal Section. She explains that the Ministry needs the students’ help because children have the unique ability to see and interact with ghostly spirits.

The Digital Ghost Hunt - Raspberry Pi Hello World

Under the tutelage of Deputy Undersecretary Quill and Professor Bray (the Ministry’s chief scientist), the young ghost-hunters learn how to program and use their own paranormal detectors. These allow students to discover ghostly traces, translate Morse code using flickering lights, and find messages left in ultraviolet ectoplasm. Meanwhile, the ghost communicates through a mixture of traditional theatrical effects and the poltergeist potential of smart home technology. Together, students uncover the ghost’s identity, discover her reason for haunting the building, unmask a dastardly villain, find a stolen necklace, clear the ghost’s name, right an old wrong, and finally set the ghost free.

The Digital Ghost Hunt - Raspberry Pi Hello World

The project conducted two successful test performances at the Battersea Arts Centre in South London in November 2018, funded by a grant from AHRC’s New Immersive Experiences Programme, led by Mary Krell of Sussex University. Its next outing will be at York Theatre Royal in August.

Adventures in learning

The Digital Ghost Hunt arose out of a shared interest in putting experimentation and play at the centre for learners. We felt that the creative, tinkering spirit of earlier computing — learning how to program BASIC on an Atari 800XL to create a game, for example — was being supplanted by a didactic and prescriptive approach to digital learning. KIT Theatre’s practice — creating classroom adventures that cast pupils as heroes in missions — is also driven by a less trammelled, more experiment-led approach to learning.

We believe that the current Computer Science curriculum isn’t engaging enough for students. We wanted to shift the context of how computer science is perceived, from ‘something techy and boyish’ back to the tool of the imagination that it should be. We did this by de-emphasising the technology itself and, instead, placing it in the larger context of a ghost story. The technology becomes a tool to navigate the narrative world — a means to an end rather than an end in itself. This helps create a more welcoming space for students who are bored or intimidated by the computer lab: a space of performance, experiment, and play.

Ghosts and machines

The device we built for the students was the SEEK Ghost Detector, made from a Raspberry Pi and a micro:bit, which Elliot stapled together. The micro:bit was the device’s interface, which students programmed using the block-based language MakeCode. The Raspberry Pi handled the heavier technical requirements of the show, and communicated them to the micro:bit in a form students could use. The detector had no screen, only the micro:bit’s LEDs. This meant that students’ attention was focused on the environment and what the detector could tell them about it, rather than having their attention pulled to a screen to the exclusion of the ‘real’ world around them.

In addition to the detector, we used a Raspberry Pi to make ordinary smart home technology into our poltergeist. It communicated with the students using effects such as smart bulbs that flashed in Morse code, which the students could then decode on their devices.

To program their detectors, students took part in a series of four lessons at school, focused on thinking like a programmer and the logic of computing. Two of the lessons featured significant time spent programming the micro:bit. The first focused on reading code on paper, and students were asked to look out for any bugs. The second had students thinking about what the detector will do, and acting out the steps together, effectively ‘performing’ the algorithm.

We based the process on KIT Theatre’s Adventures in Learning model, and its Theory of Change:

  • Disruption: an unexpected event grabs attention, creating a new learning space
  • Mission: a character directly asks pupils for their help in completing a mission
  • Achievement: pupils receive training and are given agency to successfully complete the mission

The Ghost Hunt

During these lessons, Deputy Undersecretary Quill kept in touch with the students via email, and the chief scientist sent them instructional videos. Their work culminated in their first official assignment: a ghost haunting the Battersea Arts Centre — a 120-year-old former town hall. After arriving, students were split into four teams, working together. Two teams analysed evidence at headquarters, while the others went out into places in the building where we’d hidden ghostly traces that their detectors would discover. The students pooled their findings to learn the ghost’s story, and then the teams swapped roles. The detectors were therefore only one method of exploring the narrative world. But the fact that they’d learned some of the code gave students a confidence in using the detectors — a sense of ownership. During one performance, one of the students pointed to a detector and said: “I made that.”

Future of the project

The project is now adapting the experience into a family show, in partnership with Pilot Theatre, premiering in York in summer 2019. We aim for it to become the core of an ecosystem of lessons, ideas, and activities — to engage audiences in the imaginative possibilities of digital technology.

You can find out more about the Digital Ghost Hunt on their website, which also includes rather lovely videos that Vimeo won’t let me embed here.

Hello World issue 9

The brand-new issue of Hello World is out today, and available right now as a free PDF download from the Hello World website.

Hello World issu 9

UK-based educators can also sign up to receive Hello World as printed magazine FOR FREE, direct to their door, by signing up here. And those outside the UK, educator or not, can subscribe to receive new issues of Hello World in their inbox on the day of release.

1 Comment

Driverless cars run by Raspberry Pi

Could the future of driverless cars be shaped by Raspberry Pi? For undergraduate researchers at the University of Cambridge, the answer is a resounding yes!

Can cars talk to each other?

A fleet of driverless cars working together to keep traffic moving smoothly can improve overall traffic flow by at least 35 percent, researchers have shown. The researchers, from the University of Cambridge, programmed a small fleet of miniature robotic cars to drive on a multi-lane track and observed how the traffic flow changed when one of the cars stopped.

So long, traffic!

By using Raspberry Pis and onboard sensors to program scale-model versions of commercially available cars, undergraduate researchers have built a fleet of driverless cars that ‘talk to each other’. They did this because they are studying how driverless technology can help reduce traffic incidents on our roads.

Cambridge University Driverless cars using Raspberry Pi

The researchers investigated how a car stalled on a multi-lane track affects the buildup of traffic, and how communication between driverless cars can prevent these buildups.

Cambridge University Driverless cars using Raspberry Pi

When the cars acted independently of each other, a stalled car caused other vehicles in the same lane to slow or stop in order to merge into the adjacent lane. This soon led to queues forming along the track. But when the cars communicated via Raspberry Pis, they could tell each other about obstacles on the track, and this allowed cars to shift lanes with the cooperation of other road users.

The researchers recently presented their paper on the subject at the International Conference on Robotics and Automation (ICRA 2019) in Montréal, Canada. You can find links to their results, plus more information, on the University of Cambridge blog.

10 Comments

Retrofit a handheld Casio portable TV with a Raspberry Pi

What do we say to the god of outdated tech? Not today! Revive an old portable television with a Raspberry Pi 3!

Pocket televisions

In the late 1980s, when I was a gadget-savvy kid, my mother bought me a pocket TV as a joint Christmas and birthday present. The TV’s image clarity was questionable, its sound tinny, and its aerial so long that I often poked myself and others in the eye while trying to find a signal. Despite all this, it was one of the coolest, most futuristic things I’d ever seen, and I treasured it. But, as most tech of its day, the pocket TV no longer needed: I can watch TV in high definition on my phone — a device half the size, with a screen thrice as large, and no insatiable hunger for AA batteries.

So what do we do with this old tech to save it from the tip?

We put a Raspberry Pi in it, of course!

JaguarWong’s Raspberry Pi 3 pocket TV!

“I picked up a broken Casio TV-400 for the princely sum of ‘free’ a few weeks back. And I knew immediately what I wanted to do with it,” imgur user JaguarWong states in the introduction for the project.

I got the Pi for Christmas a couple of years back and have never really had any plans for it. Not long after I got it, I picked up the little screen from eBay to play with but again, with no real purpose in mind — but when I got the pocket TV everything fell into place.

Isn’t it wonderful when things fall so perfectly into place?

Thanks to an online pinout guide, JW was able to determine how to  connect the screen and the Raspberry Pi; fortunately, only a few jumper wires were needed — “which was handy given the limits on space.”

With slots cut into the base of the TV for the USB and Ethernet ports, the whole project fit together like a dream, with little need for modification of the original housing.

The final result is wonderful. And while JW describes the project as “fun, if mostly pointless”, we think it’s great — another brilliant example of retrofitting old tech with Raspberry Pi!

10/10 would recommend to a friend.

No Comments

An opportunity to reach thousands with the Raspberry Pi

Dr Bob Brown is a former professor who taught at Kennesaw State University and Southern Polytechnic State University. He holds a doctorate in computer information systems. Bob is also a Raspberry Pi Certified Educator, and continues to provide exceptional classroom experiences for K-12 students. The moment his students have that “Aha!” feeling is something he truly values, and he continues to enjoy that experience in his K-12 classroom visits.

After retiring from teaching computing in 2017, Bob continued his school visits, first on an informal basis, and later as an official representative of KSU’s College of Computing and Software Engineering (CCSE). Keen to learn more about K-12 Computing, Bob applied to the Raspberry Pi Foundation’s Picademy program, and attended Picademy Atlanta in 2018. Here’s his story of how he has since gone on to lead several Raspberry Pi Teachers’ Workshops, inspiring educators and students alike.

“I couldn’t have done this if I had not attended Picademy” — Bob Brown

“I was amazed at the excitement and creativity that Picademy and the Raspberry Pi created among the teachers who attended,” Bob says. “After reading about the number of applicants for limited Picademy positions, I realized there was unmet demand. I began to wonder whether we could do something similar at the CCSE.”

Bob spent over a hundred hours developing instructional material, and raised over $2,000 from Southern Polytechnic alumni. With the money he raised, Bob conducted a pilot workshop for half a dozen teachers in the autumn of 2018. The workshop was free for participants, and covered material similar to Picademy, but in a one-day format. Participants were also given a Raspberry Pi 3B+ and a parts pack. Bob says, “I couldn’t have done this if I had not attended Picademy and been able to start with the Picademy material from the Raspberry Pi Foundation.”

“[The CCSE] helps improve access, awareness, and sustainability to middle and high school students and teachers.” — Jon Preston

The Dean of CCSE at KSU, Dr Jon Preston, was so impressed with the results of the pilot workshop that he authorised a formal fundraising program and two additional workshops in the spring of 2019. Four more workshops have also been scheduled for the summer.

“The College of Computing and Software Engineering at KSU STEM+Computing project helps improve access, awareness, and sustainability to middle and high school students and teachers. CCSE faculty and undergraduate students build learning materials and deliver these materials on-site to schools in an effort to increase the number of students who are energized by computing and want to study computing to help improve their careers and the world. Given the price and power of the Raspberry Pi computers, these devices are a perfect match for our project in the local schools,” says Preston.

The teachers really enjoyed the workshop, and left incredibly inspired.

Teachers came from all over Georgia and from as far away as Mississippi to attend the workshops. For some of the teachers, it was their first time exploring the concept of physical computing, and the hands-on approach to the workshop helped them set their own pace. The teachers really enjoyed the workshop, and left incredibly inspired. “Teacher workshops have a multiplier effect,” says Brown. “If I teach 30 students, I’ve reached 30 students; if I teach 30 teachers, I potentially reach thousands of students over a period of years.”

Another great contribution to the program was the addition of college student facilitators, who provided individual support to the teachers throughout the day, making it easier for everyone to have the assistance they needed.

By the end of the summer, more than 150 K-12 teachers will have participated in a CCSE Raspberry Pi Teachers’ Workshop.

The Raspberry Pi Teachers’ Workshops have become a regular part of the outreach efforts of the CCSE. Grants from State Farm Insurance, 3M Corporation, and a few very generous individual gifts keep the workshops free for K-12 teachers, who also take home a Raspberry Pi and extra components and parts. Participants are also invited to join an online forum where they can exchange ideas and support each other. By the end of the summer, more than 150 K-12 teachers will have participated in a CCSE Raspberry Pi Teachers’ Workshop. You can find more information about the workshops here.

7 Comments

Coding an isometric game map | Wireframe issue 15

Isometric graphics give 2D games the illusion of depth. Mark Vanstone explains how to make an isometric game map of your own.

Published by Quicksilva in 1983, Ant Attack was one of the earliest games to use isometric graphics. And you threw grenades at giant ants. It was brilliant.

Isometric projection

Most early arcade games were 2D, but in 1982, a new dimension emerged: isometric projection. The first isometric game to hit arcades was Sega’s pseudo-3D shooter, Zaxxon. The eye-catching format soon caught on, and other isometric titles followed: Q*bert came out the same year, and in 1983 the first isometric game for home computers was published: Ant Attack, written by Sandy White.

Ant Attack

Ant Attack was first released on the ZX Spectrum, and the aim of the game was for the player to find and rescue a hostage in a city infested with giant ants. The isometric map has since been used by countless titles, including Ultimate Play The Game’s classics Knight Lore and Alien 8, and my own educational history series ArcVenture.

Let’s look at how an isometric display is created, and code a simple example of how this can be done in Pygame Zero — so let’s start with the basics. The isometric view displays objects as if you’re looking down at 45 degrees onto them, so the top of a cube looks like a diamond shape. The scene is made by drawing cubes on a diagonal grid so that the cubes overlap and create solid-looking structures. Additional layers can be used above them to create the illusion of height.

Blocks are drawn from the back forward, one line at a time and then one layer on top of another until the whole map is drawn.

The cubes are actually two-dimensional bitmaps, which we start printing at the top of the display and move along a diagonal line, drawing cubes as we go. The map is defined by a three-dimensional list (or array). The list is the width of the map by the height of the map, and has as many layers as we want to represent in the upward direction. In our example, we’ll represent the floor as the value 0 and a block as value 1. We’ll make a border around the map and create some arches and pyramids, but you could use any method you like — such as a map editor — to create the map data.

To make things a bit easier on the processor, we only need to draw cubes that are visible in the window, so we can do a check of the coordinates before we draw each cube. Once we’ve looped over the x, y, and z axes of the data list, we should have a 3D map displayed. The whole map doesn’t fit in the window, and in a full game, the map is likely to be many times the size of the screen. To see more of the map, we can add some keyboard controls.

Here’s Mark’s isometric map, coded in Python. To get it running on your system, you’ll first need to install Pygame Zero. And to download the full code, visit our Github repository here.

If we detect keyboard presses in the update() function, all we need to do to move the map is change the coordinates we start drawing the map from. If we start drawing further to the left, the right-hand side of the map emerges, and if we draw the map higher, the lower part of the map can be seen.

We now have a basic map made of cubes that we can move around the window. If we want to make this into a game, we can expand the way the data represents the display. We could add differently shaped blocks represented by different numbers in the data, and we could include a player block which gets drawn in the draw() function and can be moved around the map. We could also have some enemies moving around — and before we know it, we’ll have a game a bit like Ant Attack.

Tiled

When writing games with large isometric maps, an editor will come in handy. You can write your own, but there are several out there that you can use. One very good one is called Tiled and can be downloaded free from mapeditor.org. Tiled allows you to define your own tilesets and export the data in various formats, including JSON, which can be easily read into Python.

Get your copy of Wireframe issue 15

You can read more features like this one in Wireframe issue 15, available now at Tesco, WHSmith, and all good independent UK newsagents.

Or you can buy Wireframe directly from Raspberry Pi Press — delivery is available worldwide. And if you’d like a handy digital version of the magazine, you can also download issue 15 for free in PDF format.

Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

3 Comments

Quick Fix — a vending machine for likes and followers

Sometimes we come across a project that just scores a perfect 10 on all fronts. This is one of them: an art installation using Raspberry Pi that has something interesting to say, does it elegantly, and is implemented beautifully (nothing presses our buttons like a make that’s got a professionally glossy finish like this).

Quick Fix is a vending machine (and art installation) that sells social media likes and followers. Drop in a coin, enter your social media account name, and an army of fake accounts will like or follow you. I’ll leave the social commentary to you. Here’s a video from the maker, Dries Depoorter:

Quick Fix – the vending machine selling likes and followers

Quick Fix in an interactive installation by Dries Depoorter. The artwork makes it possible to buy followers or likes in just a few seconds. For a few euros you already have 200 of likes on Instagram. “Quick Fix “is easy to use. Choose your product, pay and fill in your social media username.

There’s a Raspberry Pi 3B+ in there, along with an Arduino, powering a coin acceptor and some I2C LCD screens. Then there’s a stainless steel heavy-duty keyboard, which we’re lusting after (a spot of Googling unearthed this, which appears to be the same thing, if you’re in the market for a panel-mounted beast of a keyboard).

This piece was commissioned by Pixelache, a cultural association from Helsinki, whose work looks absolutely fascinating if you’ve got a few minutes to browse. Thanks to them and to Dries Depoorter — I have a feeling this won’t be the last of his projects we’re going to feature here.

11 Comments