Sustainable clothing with Rapanui and Raspberry Pi

New to the Raspberry Pi Store, Cambridge: T-shirts made using Raspberry Pis in Rapanui’s sustainable factory.

Oli Wilkin – our Glorious Retail Guru, to give him his formal title – has been hard at work this year bringing the Raspberry Pi Store, Cambridge, to life. Open since February, the store continues to evolve as it introduces our credit card-sized computer to a high-street audience. Oli and the store team are always talking to customers, exploring new ideas, and making changes. Here’s Oli on the latest development: Rapanui clothing, made sustainably with the help of Raspberry Pis.

Rapanui 2

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Rapanui

Brothers Mart and Rob started bespoke clothing company Rapanui in a garden shed on the Isle of Wight, with an initial investment of £200 (about $257 US). Ten years later, Rapanui has grown to a fully fledged factory providing over 100 jobs. Their vision to create a sustainable clothing brand has seen them increase Rapanui’s offering from T-shirts to a much wider range of clothing, including jumpers, socks, and jackets. Another reason we like them a lot is that the factory uses over 100 Raspberry Pis with a wide variety of functions.

Rapanui’s early early days weres not without their challenges. Mart and Rob found early on that every improvement in sustainability came with a price tag. They realised that they could use technology to help keep costs down without cutting corners:

Along the way, we needed a real low-cost option for us to be able to get computing in and around the place. Someone said,
“Oh, you should check out Raspberry Pi.”
“What’s that?”
“It’s a computer, and costs twenty quid or something, and it’s the size of a credit card.”
“OK – that can’t be true!”

We got one, and it just blew our mind, because there’s no limit to what we could do with it.
– Mart

The Raspberry Pis are supporting things like productivity improvements, order tracking, workload prioritisation, and smart lighting. All employees are encouraged to try coding when they start working for Rapanui, and they’re empowered to change their workplace to make it smarter and more efficient.



As Mart explains,

In the world today, there’s a lot of issues around environment and sustainability, which feel like compromises – you want to do your bit, but it costs more. What this kind of technology allows us to do is make things cost less because you can create these massive efficiencies through technology, and that’s what enables you to be able to afford the things that you want to do with sustainability, without having to compromise on price.

Circular economy

All of the organic cotton that Rapanui uses is fully traced from India to the Isle of Wight, where it is turned into amazing quality branded items for their customers. Once a garment has come to the end of its life, a customer can simply scan the QR code on the inside label, and this QR code generates a Freepost address. This allows the customer to send their item back to Rapanui for a webshop credit, thus creating a circular economy.

Raspberry Pi + Rapanui

All of this makes us very pleased to be working with Rapanui to print the T-shirts you buy in the Raspberry Pi store.

Rapanui – from workshop to store

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

We have started with our Raspberry Pi 4 T-shirt, and others will follow. Our hope is that all our T-shirts will be fully sustainable and better for you, our customers.

The post Sustainable clothing with Rapanui and Raspberry Pi appeared first on Raspberry Pi.



Source: Raspberry Pi – Sustainable clothing with Rapanui and Raspberry Pi

Listen to World War II radio recordings with a Raspberry Pi Zero

With the 50th anniversary of the D-Day landings very much in the news this year, Adam Clark found himself interested in all things relating to that era. So it wasn’t long before he found himself on the Internet Archive listening to some of the amazing recordings of radio broadcasts from that time. In this month’s HackSpace magazine, Adam details how he built his WW2 radio-broadcast time machine using a Raspberry Pi Zero W, and provides you with the code to build your own.

As good as the recordings on the Internet Archive were, it felt as if something was missing by listening to them on a modern laptop, so I wanted something to play them back on that was more evocative of that time, and would perhaps capture the feeling of listening to them on a radio set.

I also wanted to make the collection portable and to make the interface for selecting and playing the tracks as easy as possible – this wasn’t going to be screen-based!

Another important consideration was to house the project in something that would not look out of place in the living room, and not to give away the fact that it was being powered by modern tech.

So I came up with the idea of using an original radio as the project case, and to use as many of the original knobs and dials as possible. I also had the idea to repurpose the frequency dial to select individual years of the war and to play broadcasts from whichever year was selected.

Of course, the Raspberry Pi was immediately the first option to run all this, and ideally, I wanted to use a Raspberry Pi Zero to keep the costs down and perhaps to allow expansion in the future outside of being a standalone playback device.

Right off the bat, I knew that I would have a couple of obstacles to overcome as the Raspberry Pi Zero doesn’t have an easy way to play audio out, and I also wanted to have analogue inputs for the controls. So the first thing was to get some audio playing to see if this was possible.

Audio playback

The first obstacle was to find a satisfactory way to playback audio. In the past, I have had some success using PWM pins, but this needs a low-pass filter as well as an amplifier, and the quality of audio was never as good as I’d hoped for.

The other alternative is to use one of the many HATs available, but these come at a price as they are normally aimed at more serious quality of audio. I wanted to keep the cost down, so these were excluded as an option. The other option was to use a mono I2S 3W amplifier breakout board – MAX98357A from Adafruit – which is extremely simple to use.

As the BBC didn’t start broadcasting stereo commercially until the late 1950s, this was also very apt for the radio (which only has one speaker).
Connecting up this board is very easy – it just requires three GPIO pins, power, and the speaker. For this, I just soldered some female jumper leads to the breakout board and connected them to the header pins of the Raspberry Pi Zero. There are detailed instructions on the Adafruit website for this which basically entails running their install script.

I’d now got a nice playback device that would easily play the MP3 files downloaded from archive.org and so the next task was to find a suitable second-hand radio set.

Preparing the case

After a lot of searching on auction sites, I eventually found a radio that was going to be suitable: wasn’t too large, was constructed from wood, and looked old enough to convince the casual observer. I had to settle for something that actually came from the early 1950s, but it drew on design influences from earlier years and wasn’t too large as a lot of the real period ones tended to be (and it was only £15). This is a fun project, so a bit of leeway was fine by me in this respect.

When the radio arrived, my first thought as a tinkerer was perhaps I should get the valves running, but a quick piece of research turned up that I’d probably have to replace all the resistors and capacitors and all the old wiring and then hope that the valves still worked. Then discovering that the design used a live chassis running at 240 V soon convinced me that I should get back on track and replace everything.

With a few bolts and screws removed, I soon had an empty case.

I then stripped out all the interior components and set about restoring the case and dial glass, seeing what I could use by way of the volume and power controls. Sadly, there didn’t seem to be any way to hook into the old controls, so I needed to design a new chassis to mount all the components, which I did in Tinkercad, an online 3D CAD package. The design was then downloaded and printed on my 3D printer.

It took a couple of iterations, and during this phase, I wondered if I could use the original speaker. It turned out to be absolutely great, and the audio took on a new quality and brought even more authenticity to the project.

The case itself was pretty worn and faded, and the varnish had cracked, so I decided to strip it back. The surface was actually veneer, but you can still sand this. After a few applications of Nitromors to remove the varnish, it was sanded to remove the scratches and finished off with fine sanding.

The wood around the speaker grille was pretty cracked and had started to delaminate. I carefully removed the speaker grille cloth, and fixed these with a few dabs of wood glue, then used some Tamiya brown paint to colour the edges of the wood to blend it back in with the rest of the case. I was going to buy replacement cloth, but it’s fairly pricey – I had discovered a trick of soaking the cloth overnight in neat washing-up liquid and cold water, and it managed to lift the years of grime out and give it a new lease of life.

At this point, I should have just varnished or used Danish oil on the case, but bitten by the restoration bug I thought I would have a go at French polishing. This gave me a huge amount of respect for anyone that can do this properly. It’s messy, time-consuming, and a lot of work. I ended up having to do several coats, and with all the polishing involved, this was probably one of the most time-consuming tasks, plus I ended up with some pretty stained fingers as a result.

The rest of the case was pretty easy to clean, and the brass dial pointer polished up nice and shiny with some Silvo polish. The cloth was glued back in place, and the next step was to sort out the dial and glass.

Frequency, volume, glass, and knobs

Unfortunately, the original glass was cracked, so a replacement part was cut from some Makrolon sheet, also known as Lexan. I prefer this to acrylic as it’s much easier to cut and far less likely to crack when drilling it. It’s used as machine guards as well and can even be bent if necessary.

With the dial, I scanned it into the PC and then in PaintShop I replaced the existing frequency scale with a range of years running from 1939 to 1945, as the aim was for anyone using the radio to just dial the year they wanted to listen to. The program will then read the value of the potentiometer, and randomly select a file to play from that year.

It was also around about now that I had to come up with some means of having the volume control the sound and an interface for the frequency dial. Again there are always several options to consider, and I originally toyed with using a couple of rotary encoders and using one of these with the built-in push button as the power switch, but eventually decided to just use some potentiometers. Now I just had to come up with an easy way to read the analogue value of the pots and get that into the program.

There are quite a few good analogue-to-digital boards and HATs available, but with simplicity in mind, I chose to use an MCP3002 chip as it was only about £2. This is a two-channel analogue-to-digital converter (ADC) and outputs the data as a 10-bit value onto the SPI bus. This sounds easy when you say it, but it proved to be one of the trickier technical tasks as none of the code around for the four-channel MCP3008 seemed to work for the MCP3002, nor did many of the examples that were around for the MCP3002 – I think I went through about a dozen examples. At long last, I did find some code examples that worked, and with a bit of modification, I had a simple way of reading the values from the two potentiometers. You can download the original code by Stéphane Guerreau from GitHub. To use this on your Raspberry Pi, you’ll also need to run up raspi-config and switch on the SPI interface. Then it is simply a case of hooking up the MCP3002 and connecting the pots between the 3v3 line and ground and reading the voltage level from the wiper of the pots. When coding this, I just opted for some simple if-then statements in cap-Python to determine where the dial was pointing, and just tweaked the values in the code until I got each year to be picked out.

Power supply and control

One of the challenges when using a Raspberry Pi in headless mode is that it likes to be shut down in an orderly fashion rather than just having the power cut. There are lots of examples that show how you can hook up a push button to a GPIO pin and initiate a shutdown script, but to get the Raspberry Pi to power back up you need to physically reset the power. To overcome this piece of the puzzle, I use a Pimoroni OnOff SHIM which cleverly lets you press a button to start up, and then press and hold it for a second to start a shutdown. It’s costly in comparison to the price of a Raspberry Pi Zero, but I’ve not found a more convenient option. The power itself is supplied by using an old power bank that I had which is ample enough to power the radio long enough to be shown off, and can be powered by USB connector if longer-term use is required.

To illuminate the dial, I connected a small LED in series with a 270R resistor to the 3v3 rail so that it would come on as soon as the Raspberry Pi received power, and this lets you easily see when it’s on without waiting for the Raspberry Pi to start up.

The code






If you’re interested in the code Adam used to build his time machine, especially if you’re considering making your own, you’ll find it all in this month’s HackSpace magazine. Download the latest issue for free here, subscribe for more issues here, or visit your local newsagent or the Raspberry Pi Store, Cambridge to pick up the magazine in physical, real-life, in-your-hands print.

The post Listen to World War II radio recordings with a Raspberry Pi Zero appeared first on Raspberry Pi.



Source: Raspberry Pi – Listen to World War II radio recordings with a Raspberry Pi Zero

Social Action Hackathon with the Scouts

When you think of the Scouts, do you think of a self-sufficient young person with heaps of creativity, leadership, initiative, and a strong team ethic? So do we! That’s why we’re so excited about our latest opportunity to bring digital making to young people with the world’s leading youth organisation.

On 9 and 10 November, a large group of Scouts converged on their global headquarters at Gilwell Park in Surrey to attend a Social Action Hackathon hosted by a great team of digital making educators from the Raspberry Pi Foundation.

The event was to celebrate internet service provider Plusnet’s partnership with the Scout Association, through which Scout groups throughout the UK will be given free WiFi access. This will allow them to work towards tech-based badges, including the Raspberry Pi Foundation’s Digital Maker Staged Activity Badge.

The Social Action Hackathon

Over two days, the Scouts participated in our cutting-edge hackathon, where they were taught authentic agile development techniques; handed a crate of Raspberry Pi computers, electronic components, and construction materials; and given free rein to create something awesome.

The Social Action Hackathon was designed to directly support the Scout Association’s A Million Hands project, which aims to encourage Scouts to ‘leave the world a little better than they found it’ by engaging with their UK-based charity partners. During the Hackathon, the Scout Association asked the young people to create a technological solution that might benefit one of these important charities, or the people and communities that they support.

Creating with tech

First, participants were shown the capabilities of the technology available to them during the Hackathon by undertaking some short, confidence-boosting programming activities, which got them thinking about what assistive technologies they could create with the resources available. Then, they chose a call-to-action video by one of the A Million Hands charity partners as the basis of their design brief.

The event was designed to feel like a role-playing game in which teams of Scouts assumed the part of a fledgling technology start-up, who were designing a product for a client which they would bring to market. The teams designed and prototyped their assistive technology through a process used all over the world in technology and software companies, known as agile development methodology.

The fundamental principles of agile development are:

  • Only work on the most important things at any given point in time
  • Break those things into bite-sized tasks for individuals to work on autonomously
  • Catch up regularly on progress to work out what is important now, and change your plan to adapt if you need to
  • Start by making something simple that works, then add to it or change it into something better in several steps

The ‘creation’ phase of the Hackathon consisted of several 90-minute rounds called sprints, each of which began with a team meeting (or stand-up) just as they would in a real agile workplace. Teams broke their project idea down into individual tasks, which were then put into an organisational tool known as a kanban board, which is designed to allow teams to get an instant snapshot of their current progress, and to help them to problem-solve, and adapt or change their current focus and plans at each stand-up meeting.

The final pitch

As their final task, teams had to present their work to a panel of experts. The four-person panel included the Raspberry Pi Foundation’s Head of Youth Partnerships, Olympia Brown, and television presenter, Reggie Yates, an advocate for Mind, one of the A Million Hands charity partners.

By completing the Social Action Hackathon, the young people also completed the fifth and most complex stage of the Digital Maker Staged Activity Badge in just two days — a real accomplishment!

Get involved!

If you think your Scout group might like to take their Digital Maker Badge, you can find free curriculum resources for all ages of Scout group, from Beavers to Explorers, on the Raspberry Pi Foundation partner page.

The post Social Action Hackathon with the Scouts appeared first on Raspberry Pi.



Source: Raspberry Pi – Social Action Hackathon with the Scouts

Gender Balance in Computing programme opens to all schools in England

After launching our Gender Balance in Computing programme this April, we have been busy recruiting for two trials within a small group of schools around England.

Today, we are opening general recruitment for the programme. This means that all primary and secondary schools in England can now take part in the upcoming trials in this landmark programme. You can register your interest here. Why not do it right now?

Woman teacher and female students at a computer

What we are doing, and why

Many young women don’t choose to study computing-related subjects. A variety of factors across primary and secondary education are likely to influence this, including girls feeling like they don’t belong in the subject or its community, a lack of sustained encouragement, and a lack of role models in computing when making their career choices. We are working with schools to better understand and help change this.

The Department for Education has recently funded our Gender Balance in Computing (GBIC) research programme, giving us the amazing opportunity to work with schools to investigate different approaches to engage girls in computing and to help increase the number of girls who select Computer Science at GCSE and A level.

Woman teacher and young students at a computer

GBIC is a collaboration between the Raspberry Pi Foundation; STEM Learning; BCS, The Chartered Institute for IT; and the Behavioural Insights Team.

Operationally, we will lead the project together with the Behavioural Insights Team, with Apps for Good and Women in Science and Engineering (WISE) also contributing to the project. Trials will run in 2019–2022 in Key Stages 1–4, and over 15,000 pupils and 550 schools will be involved. It will be the largest national research effort to tackle gender balance in computing to date!

Which approaches are we trialling?

The different trials in this programme are related to:

  • Non-formal learning
  • Belonging
  • Relevance
  • Teaching approaches

Non-formal learning (Primary and Secondary, Jan 2020 – Mar 2020)

In the non-formal learning trial, which started in September, we seek to strengthen the links between non-formal learning and studying computing at GCSE or A level. The reason for this is that girls are often unaware that their non-formal learning about computing can help them in formal studies. Girls are also better represented in non-formal computing clubs than in formal settings where computing is taught, i.e. they are engaging with computing outside of the classroom, but not in their formal studies. So far in the non-formal learning trial, we have created specific resources for schools running Code Clubs and Apps for Good programmes which signpost the links between non-formal and formal learning of computing, and how these can lead to future career/subject choices later in the participants’ lives.

Belonging (Years 6 and 8, Sep 2020 – Jul 2021)

The belonging trial will tackle girls’ “lack of belonging” because they don’t see themselves represented in computing media coverage. To address this situation, we will work with primary and secondary schools to introduce girls and their parents to positive role models in computer science, deliver testimonials from these role models at key transition points in their education (such as while making their GCSE choices), and encourage the development of peer support networks.

Woman teacher and female student at a laptop
Woman teacher and female students at a computer
Male teacher and female student at a computer

Relevance (Years 6 and 8, Jan 2021 – May 2022)

The relevance trial will look at helping learners to see the real-world applications of learning computing. We will support schools to hold stimulus days that engage pupils by helping them to solve real-world problems through technology. We will also encourage pupils to develop projects that solve problems that are relevant to their local area, home, or classroom. The pupils will be able to further explore the real-world applications of computing through newly written classroom resources.

Teaching Approach (Years 6 and 8, Jan 2021 – May 2022)

The teaching approach trial is based on the idea that current approaches to teaching computing may not be fully inclusive and so may be less appealing to girls. In Key Stage 1, we will trial a “storytelling around computing” approach. In Key Stage 2 and 3, we will explore different types of teaching approaches to assess what the most effective mix is for engaging girls in the subject.

There is also an innovation trial, which we will develop based on any additional promising research pathways that emerge while the GBIC project progresses.

One male and two female teenagers at a computer

Join our GBIC School Network

By joining our programme, you’ll become part of our GBIC School Network.

This will give your school:

  • The chance to participate in projects designed to increase girls’ engagement in computing  although designed to make computing more accessible for girls, all of our projects are designed for whole cohorts at your school to take part in, including boys
  • A bi-monthly GBIC newsletter that will keep you up to date with the project and other news on addressing gender balance in computing
  • Opportunities to participate in events to promote the sharing of best practice and research updates between fellow GBIC School Network schools

As part of the GBIC School Network, your school will need to:

  • Identify a key contact in the school who will liaise with the GBIC School Network and our researchers at Raspberry Pi
  • Send out the information and opt-out consent forms (which we will provide) to parents of pupils in the relevant year groups
  • Deliver the trial materials in line with the project guides; the timeline, delivery model, and types of material will differ depending on the trial

A male teachers and three female students at a computer

Get involved in this landmark programme

  • Register your interest in taking part
  • Send this article to a colleague in a different school and invite them to register their interest
  • If you’re interested in this research but can’t take part, we’d love you to sign up to our bi-monthly newsletter, and to include a link to this article in any newsletters, blog entries, or social media posts you are sharing with teachers

Your support is invaluable — together we can work to improve the gender balance in computing!

The post Gender Balance in Computing programme opens to all schools in England appeared first on Raspberry Pi.



Source: Raspberry Pi – Gender Balance in Computing programme opens to all schools in England

Real-life DOR-15 bowler hat from Disney’s Meet the Robinsons

Why wear a boring bowler hat when you can add technology to make one of Disney’s most evil pieces of apparel?

Meet the Robinsons

Meet the Robinsons is one of Disney’s most underrated movies. Thank you for coming to my TED talk.

What’s not to love? Experimental, futuristic technology, a misunderstood villain, lessons of love and forgiveness aplenty, and a talking T-Rex!

For me, one of the stand-out characters of Meet the Robinsons is DOR-15, a best-of-intentions experiment gone horribly wrong. Designed as a helper hat, DOR-15 instead takes over the mind of whoever is wearing it, hellbent on world domination.

Real-life DOR-15

Built using a Raspberry Pi and the MATRIX Voice development board, the real-life DOR-15, from Team MATRIX Labs, may not be ready to take over the world, but it’s still really cool.

With a plethora of built-in audio sensors, the MATRIX Voice directs DOR-15 towards whoever is making sound, while a series of servos wiggle 3D‑printed legs for added creepy.

This project uses ODAS (Open embeddeD Audition System) and some custom code to move a servo motor in the direction of the most concentrated incoming sound in a 180 degree radius. This enables the hat to face a person calling to it.

The added wiggly spider legs come courtesy of this guide by the delightful Jorvon Moss, whom HackSpace readers will remember from issue 21.

In their complete Hackster walkthrough, Team Matrix Lab talk you through how to build your own DOR-15, including all the files needed to 3D‑print the legs.

Realising animated characters and props

So, what fictional wonder would you bring to life? Your own working TARDIS? Winifred’s spellbook? Mary Poppins’ handbag? Let us know in the comments below.

The post Real-life DOR-15 bowler hat from Disney’s Meet the Robinsons appeared first on Raspberry Pi.



Source: Raspberry Pi – Real-life DOR-15 bowler hat from Disney’s Meet the Robinsons

Code a Phoenix-style mothership battle | Wireframe #26

It was one of gaming’s first boss battles. Mark Vanstone shows you how to recreate the mothership from the 1980 arcade game, Phoenix.

Phoenix’s fifth stage offered a unique challenge in 1980: one of gaming’s first-ever boss battles.

First released in 1980, Phoenix was something of an arcade pioneer. The game was the kind of post-Space Invaders fixed-screen shooter that was ubiquitous at the time: players moved their ship from side to side, shooting at a variety of alien birds of different sizes and attack patterns. The enemies moved swiftly, and the player’s only defence was a temporary shield which could be activated when the birds swooped and strafed the lone defender. But besides all that, Phoenix had a few new ideas of its own: not only did it offer five distinct stages, but it also featured one of the earliest examples of a boss battle – its heavily armoured alien mothership, which required accurate shots to its shields before its weak spot could be exposed.

To recreate Phoenix’s boss, all we need is Pygame Zero. We can get a portrait style window with the WIDTH and HEIGHT variables and throw in some parallax stars (an improvement on the original’s static backdrop) with some blitting in the draw() function. The parallax effect is created by having a static background of stars with a second (repeated) layer of stars moving down the screen.

The mothership itself is made up of several Actor objects which move together down the screen towards the player’s spacecraft, which can be moved right and left using the mouse. There’s the main body of the mothership, in the centre is the alien that we want to shoot, and then we have two sets of moving shields.

Like the original Phoenix, our mothership boss battle has multiple shields that need to be taken out to expose the alien at the core.

In this example, rather than have all the graphics dimensions in multiples of eight (as we always did in the old days), we will make all our shield blocks 20 by 20 pixels, because computers simply don’t need to work in multiples of eight any more. The first set of shields is the purple rotating bar around the middle of the ship. This is made up of 14 Actor blocks which shift one place to the right each time they move. Every other block has a couple of portal windows which makes the rotation obvious, and when a block moves off the right-hand side, it is placed on the far left of the bar.

The second set of shields are in three yellow rows (you may want to add more), the first with 14 blocks, the second with ten blocks, and the last with four. These shield blocks are fixed in place but share a behaviour with the purple bar shields, in that when they are hit by a bullet, they change to a damaged version. There are four levels of damage before they are destroyed and the bullets can pass through. When enough shields have been destroyed for a bullet to reach the alien, the mothership is destroyed (in this version, the alien flashes).

Bullets can be fired by clicking the mouse button. Again, the original game had alien birds flying around the mothership and dive-bombing the player, making it harder to get a good shot in, but this is something you could try adding to the code yourself.

To really bring home that eighties Phoenix arcade experience, you could also add in some atmospheric shooting effects and, to round the whole thing off, have an 8-bit rendition of Beethoven’s Für Elise playing in the background.

Here’s Mark’s code, which gets a simple mothership battle running in Python. To get it working on your system, you’ll first need to install Pygame Zero. And to download the full code, go here.

Get your copy of Wireframe issue 26

You can read more features like this one in Wireframe issue 26, available now at Tesco, WHSmith, all good independent UK newsagents, and the Raspberry Pi Store, Cambridge.

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 26 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!

The post Code a Phoenix-style mothership battle | Wireframe #26 appeared first on Raspberry Pi.



Source: Raspberry Pi – Code a Phoenix-style mothership battle | Wireframe #26

Securely tailor your TV viewing with BBC Box and Raspberry Pi

Thanks to BBC Box, you might be able to enjoy personalised services without giving up all your data. Sean McManus reports:

One day, you could watch TV shows that are tailored to your interests, thanks to BBC Box. It pulls together personal data from different sources in a household device, and gives you control over which apps may access it.

“If we were to create a device like BBC Box and put it out there, it would allow us to create personalised services without holding personal data,” says Max Leonard.

TV shows could be edited on the device to match the user’s interests, without those interests being disclosed to the BBC. One user might see more tech news and less sport news, for example.

BBC Box was partly inspired by a change in the law that gives us all the right to reuse data that companies hold on us. “You can pull out data dumps, but it’s difficult to do anything with them unless you’re a data scientist,” explains Max. “We’re trying to create technologies to enable people to do interesting things with their data, and allow organisations to create services based on that data on your behalf.”

Building the box

BBC Box is based on Raspberry Pi 3B+, the most powerful model available when this project began. “Raspberry Pi is an amazing prototyping platform,” says Max. “Relatively powerful, inexpensive, with GPIO, and able to run a proper OS. Most importantly, it can fit inside a small box!”

That prototype box is a thing of beauty, a hexagonal tube made of cedar wood. “We created a set of principles for experience and interaction with BBC Box and themes of strength, protection, and ownership came out very strongly,” says Jasmine Cox. “We looked at shapes in nature and architecture that were evocative of these themes (beehives, castles, triangles) and played with how they could be a housing for Raspberry Pi.”

The core software for collating and managing access to data is called Databox. Alpine Linux was chosen because it’s “lightweight, speedy but most importantly secure”, in Max’s words. To get around problems making GPIO access work on Alpine Linux, an Arduino Nano is used to control the LEDs. Storage is a 64GB microSD card, and apps run inside Docker containers, which helps to isolate them from each other.

Combining data securely

The BBC has piloted two apps based on BBC Box. One collects your preferred type of TV programme from BBC iPlayer and your preferred music genre from Spotify. That unique combination of data can be used to recommend events you might like from Skiddle’s database.

Another application helps two users to plan a holiday together. It takes their individual preferences and shows them the destinations they both want to visit, with information about them brought in from government and commercial sources. The app protects user privacy, because neither user has to reveal places they’d rather not visit to the other user, or the reason why.

The team is now testing these concepts with users and exploring future technology options for BBC Box.

The MagPi magazine

This article was lovingly yoinked from the latest issue of The MagPi magazine. You can read issue 87 today, for free, right now, by visiting The MagPi website.

You can also purchase issue 87 from the Raspberry Pi Press website with free worldwide delivery, from the Raspberry Pi Store, Cambridge, and from newsagents and supermarkets across the UK.

 

The post Securely tailor your TV viewing with BBC Box and Raspberry Pi appeared first on Raspberry Pi.



Source: Raspberry Pi – Securely tailor your TV viewing with BBC Box and Raspberry Pi

Raspberry Pi snail habitats for Mrs Nation’s class

These Raspberry Pis take hourly photographs of snails in plastic container habitats, sharing them to the Snail Habitat website.

Snails

While some might find them kind of icky, I am in love with snails (less so with their homeless cousin, the slug), so this snail habitat project from Mrs Nation’s class is right up my alley.

Snail Habitats



This project was done in a classroom with 22 students. We broke the kids out into groups and created 5 snail habitats. It would be a great project to do school-wide too, where you create 1 snail habitat per class. This would allow the entire school to get involved and monitor each other’s habitats.

Each snail habitat in Mrs Nation’s class is monitored by a Raspberry Pi and camera module, and Misty Lackie has written specific code to take a photo every hour, uploading the image to the dedicated Snail Habitat website. This allows the class to check in on their mollusc friends without disturbing their environment.

“I would love to see others habitats,” Misty states on the project’s GitHub repo, “so if you create one, please share it and I would be happy to publish it on snailhabitat.com.”

Snail facts according to Emma, our resident Bug Doctor

  • The World Snail Racing Championships take place in Norfolk every year. Emma’s friend took a snail there once, but it didn’t win.
  • Roman snails, while common in the UK, aren’t native to the country. They were brought to the country by the Romans. Emma is 99% sure this fact is correct.
  • Garlic snails, when agitated, emit a garlic scent. Helen likes the idea of self-seasoning escargots. Alex is less than convinced.
  • Snails have no backbone, making them awful wingmen during late-night pub brawls and confrontations.
  • This GIF may be fake:

The post Raspberry Pi snail habitats for Mrs Nation’s class appeared first on Raspberry Pi.



Source: Raspberry Pi – Raspberry Pi snail habitats for Mrs Nation’s class

New book (with added computer): Get Started with Raspberry Pi

The Raspberry Pi Press is really excited to announce the release of Get Started with Raspberry Pi. This isn’t just a book about a computer: it’s a book with a computer.

Ideal for beginners, this official guide and starter kit contains everything you need to get started with Raspberry Pi.

Inside you’ll find a Raspberry Pi 3A+, the official case, and a 16GB microSD memory card – preloaded with NOOBS, containing the Raspbian operating system. The accompanying 116-page book is packed with beginner’s guides to help you master your new Raspberry Pi!

  • Set up your new Raspberry Pi 3A+ for the first time.
  • Discover amazing software built for creative learning.
  • Learn how to program in Scratch and Python.
  • Control electronics: buttons, lights, and sensors.

A brilliant Christmas gift idea, it’s available now in the Raspberry Pi Press store. As always, we have also released the guide as a free PDF – minus the 3A+, case and SD card, of course!

Raspberry Pi Beginner’s Guide 3rd Edition

And that’s not all! We have also created a new edition of our popular Raspberry Pi Beginner’s Guide book.

As well as covering Raspberry Pi 4, this 252-page book features programming and physical computing projects updated for Scratch 3, which is available in the latest version of Raspbian.

It’s available now in the Raspberry Pi Press Store, with free worldwide delivery. And, as always, you can also download a free PDF version.

Free downloads: why?

Curious minds should make note that Raspberry Pi Press releases free downloadable PDFs of all publications on launch day. Why? Because, in line with our mission statement, we want to put the power of computing and digital making into the hands of people all over the world, and that includes the wealth of information we publish as part of Raspberry Pi Press.

We publish new issues of Wireframe magazine every two weeks, new issues of HackSpace magazine and The MagPi magazine every month, and project books such as The Book of Making, Wearable Tech Projects, and An Introduction to C & GUI Programming throughout the year.

If you’d like to own a physical copy of any of our publications, we offer free international shipping across our product range. You’ll also find many of our magazines in top UK supermarkets and newsagents, and in Barnes and Noble in the US.

 

The post New book (with added computer): Get Started with Raspberry Pi appeared first on Raspberry Pi.



Source: Raspberry Pi – New book (with added computer): Get Started with Raspberry Pi

Build the ultimate 4K home theatre PC using a Raspberry Pi 4 and Kodi

We love Raspberry Pi for how it’s helping a new generation of children learn to code, how it’s resulted in an explosion of new makers of all ages, and how it’s really easy to turn any TV into a smart TV.

While we always have a few Raspberry Pi computers at hand for making robots and cooking gadgets, or just simply coding a Scratch game, there’s always at least one in the house powering a TV. With the release of the super-powered Raspberry Pi 4, it’s time to fully upgrade our media centre to become a 4K-playing powerhouse.

We asked Wes Archer to take us through setting one up. Grab a Raspberry Pi 4 and a micro-HDMI cable, and let’s get started.

Get the right hardware

Only Raspberry Pi 4 can output at 4K, so it’s important to remember this when deciding on which Raspberry Pi to choose.

Raspberry Pi has been a perfect choice for a home media centre ever since it was released in 2012, due to it being inexpensive and supported by an active community. Now that 4K content is fast becoming the new standard for digital media, the demand for devices that support 4K streaming is growing, and fortunately, Raspberry Pi 4 can handle this with ease! There are three versions of Raspberry Pi 4, differentiated by the amount of RAM they have: 1GB, 2GB, or 4GB. So, which one should you go for? In our tests, all versions worked just fine, so go with the one you can afford.

Raspberry Pi Cases

Flirc Raspberry Pi 4 case

Made of aluminium and designed to be its own heatsink, the Flirc case for Raspberry Pi 4 is a perfect choice and looks great as part of any home media entertainment setup. This will look at home in any home entertainment system.

Official Raspberry Pi 4 case (in black and grey)

The official Raspberry Pi 4 case is always a good choice, especially the black and grey edition as it blends in well within any home entertainment setup. If you’re feeling adventurous, you can also hack the case to hold a small fan for extra cooling.

Aluminium Heatsink Case for Raspberry Pi 4

Another case made of aluminium, this is effectively a giant heatsink that helps keep your Raspberry Pi 4 cool when in use. It has a choice of three colours – black, gold, and gunmetal grey – so is a great option if you want something a little different.

Optional Raspberry Pi add-ons

Maxtor 2TB external USB 3.0 HDD

4K content can be quite large and your storage will run out quickly if you have a large collection. Having an external hard drive connected directly to your Raspberry Pi using the faster USB 3.0 connection will be extremely handy and avoids any streaming lag.

Raspberry Pi Fan SHIM

The extra power Raspberry Pi 4 brings means things can get quite hot, especially when decoding 4K media files, so having a fan can really help keep things cool. Pimoroni’s Fan SHIM is ideal due to its size and noise (no loud buzzing here). There is a Python script available, but it also “just works” with the power supplied by Raspberry Pi’s GPIO pins.

Raspberry Pi TV HAT

If you are feeling adventurous, you can add a Raspberry Pi TV HAT to your 4K media centre to enable the DVR feature in Kodi to watch live TV. You may want to connect your main aerial for the best reception. This will add a perfect finishing touch to your 4K media centre.

Rii i8+ Mini Wireless Keyboard

If your TV does not support HDMI-CEC, allowing you to use your TV remote to control Kodi, then this nifty wireless keyboard is extremely helpful. Plug the USB dongle into your Raspberry Pi, turn on the keyboard, and that’s it. You now have a mini keyboard and mouse to navigate with.

Read more for free…

Looking to read the rest of this article? We don’t blame you. Build the ultimate 4K home theatre PC using a Raspberry Pi 4 and Kodi is this month’s feature article for the brand-new MagPi magazine issue 87, out today.

You can read issue 87 today, for free, right now, by visiting The MagPi website.



You can also purchase issue 87 from the Raspberry Pi Press website with free worldwide delivery, from the Raspberry Pi Store, Cambridge, and from newsagents and supermarkets across the UK.

The post Build the ultimate 4K home theatre PC using a Raspberry Pi 4 and Kodi appeared first on Raspberry Pi.



Source: Raspberry Pi – Build the ultimate 4K home theatre PC using a Raspberry Pi 4 and Kodi

Project anyone’s face onto your own with Raspberry Pi Zero

Sean Hodgins is back with a new Halloween-themed project, this time using a pico projector and a Raspberry Pi Zero to display images and animations onto a mask.

It’s kinda creepy but very, very cool.

Face Changing Projection Mask – Be Anyone

Have a hard time deciding what to be on Halloween? Just be everything. Some links for the project below. Support my Free Open Source Projects by becoming joining the Patreon!

Face-changing projection mask

Sean designed his own PCB – classic Sean – to connect the header pins of a Raspberry Pi Zero to a pico projector. He used Photoshop to modify video and image files in order to correct the angle of projection onto the mask.

He then 3D-printed this low poly mask from Thingiverse, adapting the design to allow him to attach it to a welding mask headband he purchased online.

As Sean explains in the video, there are a lot of great ways you can use the mask. Our favourite suggestion is using a camera to take a photo of someone and project their own face back at them. This idea is reminiscent of the As We Are project in Columbus, Ohio, where visitors sit inside a 14-foot tall head as their face is displayed on screens covering the outside.

For more of Sean’s excellent Raspberry Pi projects, check out his YouTube channel, and be sure to show him some love by clicking the ol’ subscribe button.

The post Project anyone’s face onto your own with Raspberry Pi Zero appeared first on Raspberry Pi.



Source: Raspberry Pi – Project anyone’s face onto your own with Raspberry Pi Zero

Build a Raspberry Pi chartplotter for your boat

Earlier this year, James Conger built a chartplotter for his boat using a Raspberry Pi. Here he is with a detailed explanation of how everything works:

Building your own Chartplotter with a Raspberry Pi and OpenCPN

Provides an overview of the hardware and software needed to put together a home-made Chartplotter with its own GPS and AIS receiver. Cost for this project was about $350 US in 2019.

The entire build cost approximately $350. It incorporates a Raspberry Pi 3 Model B+, dAISy AIS receiver HAT, USB GPS module, and touchscreen display, all hooked up to his boat.



Perfect for navigating the often foggy San Francisco Bay, the chartplotter allows James to track the position, speed, and direction of major vessels in the area, superimposed over high-quality NOAA nautical charts.

Raspberry Pi at sea

For more nautically themed Raspberry Pi projects, check out Rekka Bellum and Devine Lu Linvega’s stunning Barometer and Ufuk Arslan’s battery-saving IoT boat hack.

The post Build a Raspberry Pi chartplotter for your boat appeared first on Raspberry Pi.



Source: Raspberry Pi – Build a Raspberry Pi chartplotter for your boat

The Raspberry Pi Foundation and Bebras

We are delighted to announce a new partnership that will ensure the long-term growth and success of the free, annual UK Bebras Computational Thinking Challenge.

Bebras UK logo

‘Bebras’ means ‘beaver’ in Lithuanian; Prof. Valentina Dagiene named the competition after this hard-working, intelligent, and lively animal.

The Raspberry Pi Foundation has teamed up with Oxford University to support the Bebras Challenge, which every November invites students to use computational thinking to solve classical computer science problems re-worked into accessible and interesting questions.

Bebras is:

  • Open to students aged 6 to 18 (and it’s quite good fun for adults too)
  • A great whole-school activity
  • Completely free
  • Easy to sign up to and take part in online
  • Open for two weeks every November; this year it runs from 4 to 15 November and you’ve still got until 31 October to register!

Woman teacher and female students at a computer

Why should I get involved in the Bebras Challenge?

Bebras is an international challenge that started in Lithuania in 2004. Participating in Bebras is a great way to engage students of all ages in the fun of problem solving, and to give them an insight into computing and what it’s all about. Computing principles are highlighted in the answers, so Bebras can be quite educational for teachers too.

Male teacher and female student at a computer
Male teacher and male students at a computer
Woman teacher and female student at a laptop

The UK became involved in Bebras for the first time in 2013, and the numbers of participating students have increased from 21,000 in the first year to 202,000 last year. Internationally, more than 2.78 million learners took part in 2018.

  • Bebras runs from 4 to 15 November this year
  • The challenge takes 40 minutes to complete
  • Use the practice questions on the website to get your students used to what they’ll encounter in challenge
  • All the marking is done for you
  • The results are sent to you the week after the challenge ends, along with an answer booklet, so that you can go through the answers with your learners
  • The highest-achieving students in each age group are invited to Oxford University to take part in the second round over a weekend in January

To give you a taste of what Bebras involves, try this example question!

You’ve still got three more days to sign up for this year’s Bebras Challenge.

Support computational thinking at your school throughout the year with Bebras

The annual challenge is only one part of the equation: questions from previous years are available as a resource with which teachers can create self-marking quizzes to use with their classes! This means you can support the computational thinking part of the school curriculum throughout the whole year.

Woman teacher and female students at a computer

You can also use the Bebras App to try 100 computational thinking problems, and download sets of Bebras Cards for primary schools.

Follow @bebrasuk to stay up to date with what’s on offer for you.

The post The Raspberry Pi Foundation and Bebras appeared first on Raspberry Pi.



Source: Raspberry Pi – The Raspberry Pi Foundation and Bebras

Portable Raspberry Pi 4 computer | Hackspace magazine #24

Why hunch over a laptop when you can use Raspberry Pi 4 to build a portable computer just for you? Here’s how HackSpace magazine editor Ben Everard did just that…

Yes, I have mislaid the CAPS LOCK and function keys from the keyboard. If you come across them in the Bristol area, please let me know.

Raspberry Pi 4

When Raspberry Pi 4 came out, I was pleasantly surprised by how the more powerful processor and enhanced memory allowed it to be a serious contender for a desktop computer. However, what if you don’t have a permanent desk? What if you want a more portable option? There are plenty of designs around for laptops built using Raspberry Pi computers, but I’ve never been that keen on the laptop form factor. Joining the screen and keyboard together always makes me feel like I’m either slumped over the screen or the keyboard is too high. I set out to build a portable computer that fitted my way of working rather than simply copying the laptop design that’s been making our backs and fingers hurt for the past decade.

Deciding where to put the parts on the plywood backing

Portable Raspberry Pi 4 computer

I headed into the HackSpace magazine workshop to see what I could come up with.

A few things I wanted to consider from a design point of view:

Material. Computer designers have decided that either brushed aluminium or black plastic are the options for computers, but ever since I saw the Novena Heirloom laptop, I’ve wanted one made in wood. This natural material isn’t necessarily perfectly suited to computer construction, but it’s aesthetically pleasing and in occasionally stressful work environments, wood is a calming material. What’s more, it’s easy to work with common tools.

Screen setup. Unsurprisingly, I spend a lot of my time reading or writing. Landscape screens aren’t brilliant choices for this, so I wanted a portrait screen. Since Raspberry Pi 4 has two HDMI ports, I decided to have two portrait HDMI screens. This lets me have one to display the thing we’re doing, and one to have the document to write about the thing we’re doing.

No in-built keyboard or mouse. Unlike a laptop, I decided I wanted to work with external input devices to create a more comfortable working setup.

Exposed wiring. There’s not a good reason for this — we just like the aesthetic (but it does make it easier to hack an upgrade in the future).

A few things I wanted to consider from a technical point of view:

Cooling. Raspberry Pi can run a little hot, so I wanted a way of keeping it cool while still enabling the complete board to be accessible for working with the GPIO.

Power. Raspberry Pi needs 5 V, but most screens need 12 V. I wanted my computer to have just a single power in. Having this on a 12 V DC means I can use an external battery pack in the future.

There’s no great secret to this build. I used two different HDMI screens (one 12 inches and one 7 inches) and mounted them on 3 mm plywood. This gives enough space to mount my Raspberry Pi below the 7-inch screen. This plywood backing is surrounded by a 2×1 inch pine wall that’s just high enough to expand beyond the screens. There’s a slight recess in this pine surround that a plywood front cover slots into to protect the screens during transport. The joints on the wood are particularly unimpressive being butt joints with gaps in. The corners are secured by protectors which I fabricated from 3 mm aluminium sheet (OK, fabricated is a bit of a grand word — we cut, bent, and drilled them from 3 mm aluminium sheet).

You can get smaller voltage converters than this, but we like the look of the large coil and seven-segment display

I made this machine quickly as we intended it to be a prototype. I fully expected that the setup would prove too unusual to be useful and planned to disassemble it and make a different form factor after I’d learned what worked and what didn’t. However, so far, I’m happy with this setup and don’t have any plans to redesign it soon.

Power comes in via a 5.1 mm jack. This goes to both the monitors and a buck converter which steps it down to 5 V for Raspberry Pi and fan (the converter has a display showing the current voltage because I like the look of seven-segment displays). Power is controlled by three rocker switches (because I like rocker switches rather than soft switches), allowing you to turn Raspberry Pi, fan, and screens on and off separately.

We used a spade drill bit and a Dremel with a sanding attachment to carve out the space for our Raspberry Pi

We’ve had to cut USB and power cables and shorten them to make them fit nicely in the case.

We had to cut quite a lot of cables up to make them fit. Fortunately, most have sensibly coloured inners to help you understand what does what

The only unusual part of the build was the cooling for Raspberry Pi. Since I wanted to leave the body of my Raspberry Pi free, that meant that I had to have a fan directing air over the CPU from the side. After jiggling the fan into various positions, I decided to mount it at 45 degrees just to the side of the board. I needed a mount for this — 3D printing would have worked well, but I’d been working through the Power Carving Manual reviewed in issue 23, so put these skills to the test and whittled a bit of wood to the right shape. Although power carving is usually used to produce artistic objects, it’s also a good choice for fabrication when you need a bit of 
a ‘try-and-see’ approach, as it lets you make very quick adjustments.

Overall, my only disappointment with the making of this computer is the HDMI cables. I decided not to cut and splice them to the correct length as the high-speed nature of the HDMI signal makes this unreliable. Instead, I got the shortest cables I could and jammed them in.

We control the fan via a switch rather than automatically for two reasons: so we can run silently when we want, and so all the GPIO pins are available for HATs and other expansions

In use, I’m really happy with my new computer. So far, it has proved sturdy and reliable, and our design decisions have been vindicated by the way it works for me. Having two portrait screens may seem odd, but at least for technology journalists it’s a great option. The 7-inch screen may seem little, but these days most websites have a mobile-friendly version that renders well in this size, and it’s also big enough for a terminal window or Arduino IDE. A few programs struggle to work in this form factor (we’re looking at you, Mu).

Our corners are not the best joints, but the metal surrounds ensure they are strong and protected from bumps (oh, and we like the look of them)

We live in a world where — for many of us — computers are an indispensable tool that we spend most of our working lives using, yet the options for creating ones that are personal and genuinely fit our way of working are slim. We don’t have to accept that. We can build the machines that we want to use: build our own tools. This is a machine designed for my needs — yours may be different, but you understand them better than anyone. If you find off-the-shelf machines don’t work well for you, head to the workshop and make something that does.

Hackspace magazine

HackSpace magazine is out now, available in print from your local newsagent or from the Raspberry Pi Store in Cambridge, online from Raspberry Pi Press, or as a free PDF download. Click here to find out more and, while you’re at it, why not have a look at the subscription offers available, including the 12-month deal that comes with a free Adafruit Circuit Playground!

The post Portable Raspberry Pi 4 computer | Hackspace magazine #24 appeared first on Raspberry Pi.



Source: Raspberry Pi – Portable Raspberry Pi 4 computer | Hackspace magazine #24

Make a Columns-style tile-matching game | Wireframe #25

Raspberry Pi’s own Rik Cross shows you how to code your own Columns-style tile-matching puzzle game in Python and Pygame Zero.

Created by Hewlett-Packard engineer Jay Geertsen, Columns was Sega’s sparkly rival to Nintendo’s all-conquering Tetris.

Columns and tile-matching

Tile-matching games began with Tetris in 1984 and the less famous Chain Shot! the following year. The genre gradually evolved through games like Dr. Mario, Columns, Puyo Puyo, and Candy Crush Saga. Although their mechanics differ, the goals are the same: to organise a board of different-coloured tiles by moving them around until they match.

Here, I’ll show how you can create a simple tile-matching game using Python and Pygame. In it, any tile can be swapped with the tile to its right, with the aim being to make matches of three or more tiles of the same colour. Making a match causes the tiles to disappear from the board, with tiles dropping down to fill in the gaps.

At the start of a new game, a board of randomly generated tiles is created. This is made as an (initially empty) two-dimensional array, whose size is determined by the values of rows and columns. A specific tile on the board is referenced by its row and column number.

We want to start with a truly random board, but we also want to avoid having any matching tiles. Random tiles are added to each board position, therefore, but replaced if a tile is the same as the one above or to it’s left (if such a tile exists).

Our board consists of 12 rows and 8 columns of tiles. Pressing SPACE will swap the 2 selected tiles (outlined in white), and in this case, create a match of red tiles vertically.

In our game, two tiles are ‘selected’ at any one time, with the player pressing the arrow keys to change those tiles. A selected variable keeps track of the row and column of the left-most selected tile, with the other tile being one column to the right of the left-most tile. Pressing SPACE swaps the two selected tiles, checks for matches, clears any matched tiles, and fills any gaps with new tiles.

A basic ‘match-three’ algorithm would simply check whether any tiles on the board have a matching colour tile on either side, horizontally or vertically. I’ve opted for something a little more convoluted, though, as it allows us to check for matches on any length, as well as track multiple, separate matches. A currentmatch list keeps track of the (x,y) positions of a set of matching tiles. Whenever this list is empty, the next tile to check is added to the list, and this process is repeated until the next tile is a different colour.

If the currentmatch list contains three or more tiles at this point, then the list is added to the overall matches list (a list of lists of matches!) and the currentmatch list is reset. To clear matched tiles, the matched tile positions are set to None, which indicates the absence of a tile at that position. To fill the board, tiles in each column are moved down by one row whenever an empty board position is found, with a new tile being added to the top row of the board.

The code provided here is just a starting point, and there are lots of ways to develop the game, including adding a scoring system and animation to liven up your tiles.

Here’s Rik’s code, which gets a simple tile-match game running in Python. To get it working on your system, you’ll first need to install Pygame Zero. And to download the full code, go here.

Get your copy of Wireframe issue 25

You can read more features like this one in Wireframe issue 25, available now at Tesco, WHSmith, all good independent UK newsagents, and the Raspberry Pi Store, Cambridge.

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 25 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!

The post Make a Columns-style tile-matching game | Wireframe #25 appeared first on Raspberry Pi.



Source: Raspberry Pi – Make a Columns-style tile-matching game | Wireframe #25

Rob’s Raspberry Pi Dungeons and Dragons table

Rob made an interactive Dungeons and Dragons table using a Raspberry Pi and an old TV. He thought it best to remind me, just in case I had forgotten. I hadn’t forgotten. Honest. Here’s a photo of it.

The table connects to Roll20 via Chromium, displaying the quest maps while the GM edits and reveals the layout using their laptop. Yes, they could just plug their laptop directly into the monitor, but using the Raspberry Pi as a bridge means there aren’t any awkward wires in the way, and the GM can sit anywhere they want around the table.

Rob wrote up an entire project how-to for The MagPi magazine. Go forth and read it!

The post Rob’s Raspberry Pi Dungeons and Dragons table appeared first on Raspberry Pi.



Source: Raspberry Pi – Rob’s Raspberry Pi Dungeons and Dragons table

The grilled cheese-making robot of your dreams

Ummm…YES PLEASE!

Cheeseborg: The Grilled Cheese Robot!

More cool stuff at http://www.tabb.me and http://www.evankhill.com Cheeseborg has one purpose: to create the best grilled cheese it possibly can! Cheeseborg is fully automated, voice activated, and easy to move. With Google Assistant SDK integration, Cheeseborg can even be used as a part of your smart home.

Does it use a Raspberry Pi, please?

Sometimes we’ll see a project online and find ourselves hoping and praying that it uses a Raspberry Pi, just so we have a reason to share it with you all.

That’s how it was when I saw Cheeseborg, the grilled cheese robot, earlier this week. “Please, please, please…” I prayed to the robot gods, as I chowed down on a grilled cheese at my desk (true story), and, by the grace of all that is good in this world, my plea was answered.

Cheeseborg: the grilled cheese robot

Cheeseborg uses both an Arduino Mega and a Raspberry Pi 3 in its quest to be the best ever automated chef in the world. The Arduino handles the mechanics, while our deliciously green wonder board runs the Google Assistant SDK, allowing you to make grilled cheese via voice command.

Saying “Google, make me a grilled cheese” will set in motion a series of events leading to the production of a perfectly pressed sammie, ideal for soup dunking or solo snacking.

The robot uses a vacuum lifter to pick up a slice of bread, dropping it onto an acrylic tray before repeating the process with a slice of cheese and then a second slice of bread. Then the whole thing is pushed into a panini press that has been liberally coated in butter spray (not shown for video aesthetics), and the sandwich is toasted, producing delicious ooey-gooey numminess out the other side.

Pareidolia much?

Here at Raspberry Pi, we give the Cheeseborg five slices out of five, and look forward to one day meeting Cheeseborg for real, so we can try out its scrummy wares.

ooooey-gooey numminess

You can find out more about Cheeseborg here.

Toastie or grilled cheese


Yes, there’s a difference: but which do you prefer? What makes them different? And what’s your favourite filling for this crispy, cheesy delight?

The post The grilled cheese-making robot of your dreams appeared first on Raspberry Pi.



Source: Raspberry Pi – The grilled cheese-making robot of your dreams

Raspberry Pi retro gaming on Reddit

Reddit was alive with the sound of retro gaming this weekend.

First out to bat is this lovely minimalist, wall-mounted design built by u/sturnus-vulgaris, who states:

I had planned on making a bar top arcade, but after I built the control panel, I kind of liked the simplicity. I mounted a frame of standard 2×4s cut with a miter saw. Might trim out in black eventually (I have several panels I already purchased), but I do like the look of wood.

Next up, a build with Lego bricks, because who doesn’t love Lego bricks?

Just completed my mini arcade cabinet that consists of approximately 1,000 [Lego bricks], a Raspberry Pi, a SNES style controller, Amazon Basics computer speakers, and a 3.5″ HDMI display.

u/RealMagicman03 shared the build here, so be sure to give them an upvote and leave a comment if, like us, you love Raspberry Pi projects that involve Lego bricks.

And lastly, this wonderful use of the Raspberry Pi Compute Module 3+, proving yet again how versatile the form factor can be.

CM3+Lite cartridge for GPi case. I made this cartridge for fun at first, and it works as all I expected. Now I can play more games l like on this lovely portable stuff. And CM3+ is as powerful as RPi3B+, I really like it.

Creator u/martinx72 goes into far more detail in their post, so be sure to check it out.

What other projects did you see this weekend? Share your links with us in the comments below.

The post Raspberry Pi retro gaming on Reddit appeared first on Raspberry Pi.



Source: Raspberry Pi – Raspberry Pi retro gaming on Reddit

We love a good pen plotter

BrachioGraph touts itself as the cheapest, simplest possible pen plotter, so, obviously, we were keen to find out more. Because, if there’s one thing we like about our community, it’s your ability to recreate large, expensive pieces of tech with a few cheap components and, of course, a Raspberry Pi.

So, does BrachioGraph have what it takes? Let’s find out.

Raspberry Pi pen plotter

The project ingredients list calls for two sticks or pieces of stiff card and, right off the bat, we’re already impressed with the household item ingenuity that had gone into building BrachioGraph. It’s always fun to see Popsicle sticks used in tech projects, and we reckon that a couple of emery boards would also do the job  although a robot with add-on nail files sounds a little too Simone Giertz, if you ask us. Simone, if you’re reading this…

You’ll also need a pencil or ballpoint pen, a peg, three servomotors, and a $5 Raspberry Pi Zero. That’s it. They weren’t joking when they said this plotter was simple.

The plotter runs on a Python script, and all the code for the project has been supplied for free. You can find it all on the BrachioGraph website, here.

We’ll be trying out the plotter for ourselves here at Pi Towers, and we’d love to see if any of you give it a go, so let us know in the comments.

 

The post We love a good pen plotter appeared first on Raspberry Pi.



Source: Raspberry Pi – We love a good pen plotter

Designing distinctive Raspberry Pi products

If you have one of our official cases, keyboards or mice, or if you’ve visited the Raspberry Pi Store in Cambridge, UK, then you know the work of Kinneir Dufort. Their design has become a part of our brand that’s recognised the world over. Here’s an account from the team there of their work with us.

Over the last six years, our team at Kinneir Dufort have been privileged to support Raspberry Pi in the design and development of many of their products and accessories. 2019 has been another landmark year in the incredible Raspberry Pi story, with the opening of the Raspberry Pi store in February, the launch of the official keyboard and mouse in April, followed by the launch of Raspberry Pi 4 in June.



We first met Eben, Gordon and James in 2013 when we were invited to propose design concepts for an official case for Raspberry Pi Model B. For the KD team, this represented a tremendously exciting opportunity: here was an organisation with a clear purpose, who had already started making waves in the computing and education market, and who saw how design could be a potent ingredient in the presentation and communication of the Raspberry Pi proposition.

Alongside specific design requirements for the Model B case, the early design work also considered the more holistic view of what the 3D design language of Raspberry Pi should be. Working closely with the team, we started to define some key design principles which have remained as foundations for all the products since:

  • Visibility of the board as the “hero” of the product
  • Accessibility to the board, quickly and simply, without tools
  • Adaptability for different uses, including encouragement to “hack” the case
  • Value expressed through low cost and high quality
  • Simplicity of form and detailing
  • Boldness to be unique and distinctively “Raspberry Pi”

Whilst maintaining a core of consistency in the product look and feel, these principles have been applied with different emphases to suit each product’s needs and functions. The Zero case, which started as a provocative “shall we do this?” sketch visual sent to the team by our Senior Designer John Cowan-Hughes after the original case had started to deliver a return on investment, was all about maximum simplicity combined with adaptability via its interchangeable lids.

Photo of three Raspberry Pi Zero cases from three different angles, showing the lid of a closed case, the base of a closed case, and an open case with an apparently floating lid and a Raspberry Pi Zero visible inside.

The ‘levitating lid’ version of the Zero case is not yet publically available

Later, with the 3A+ case, we started with the two-part case simplicity of the Zero case and applied careful detailing to ensure that we could accommodate access to all the connectors without overcomplicating the injection mould tooling. On Raspberry Pi 4, we retained the two-part simplicity in the case, but introduced new details, such as the gloss chamfer around the edge of the case, and additional material thickness and weight to enhance the quality and value for use with Raspberry Pi’s flagship product.

After the success of the KD design work on Raspberry Pi cases, the KD team were asked to develop the official keyboard and mouse. Working closely with the Raspberry Pi team, we explored the potential for adding unique features but, rightly, chose to do the simple things well and to use design to help deliver the quality, value and distinctiveness now integrally associated with Raspberry Pi products. This consistency of visual language, when combined with the Raspberry Pi 4 and its case, has seen the creation of a Raspberry Pi as a new type of deconstructed desktop computer which, in line with Raspberry Pi’s mission, changes the way we think about, and engage with, computers.


The launch of the Cambridge store in February – another bold Raspberry Pi move which we were also delighted to support in the early planning and design stages – provides a comprehensive view of how all the design elements work together to support the communication of the Raspberry Pi message. Great credit should go to the in-house Raspberry Pi design team for their work in the development and implementation of the visual language of the brand, so beautifully evident in the store.

Small tabletop model of the side walls, rear walls, front windows, and floor of the Raspberry Pi Store. The model is annotated with handwritten Post-It notes in a variety of colours.

An early sketch model of the Raspberry Pi Store

In terms of process, at KD we start with a brief – typically discussed verbally with the Raspberry Pi team – which we translate into key objectives and required features. From there, we generally start to explore ideas with sketches and basic mock-ups, progressively reviewing, testing and iterating the concepts.

Top-down photo of a desk covered with white paper on which are a couple of Raspberry Pis and several cases. The hands of someone sketching red and white cases on the paper are visible. Also visible are the hands of someone measuring something with digital calipers, beside a laptop on the screen of which is a CAD model of a Raspberry Pi case.

Sketching and modelling and reviewing

For evaluating designs for products such as the cases, keyboard and mouse, we make considerable use of our in-house 3D printing resources and prototyping team. These often provide a great opportunity for the Raspberry Pi team to get hands on with the design – most notably when Eben took a hacksaw to one of our lovingly prepared 3D-printed prototypes!

Phone photo of Eben sitting at a desk and hacksawing a white 3D-printed prototype Raspberry Pi case

EBEN YOUR FINGERS

Sometimes, despite hours of reviewing sketches and drawings, and decades of experience, it’s not until you get hands-on with the design that you can see further improvements, or you suddenly spot a new approach – what if we do this? And that’s the great thing about how our two teams work together: always seeking to share and exchange ideas, ultimately to produce better products.

Photo of three people sitting at a table in an office handling and discussing 3D-printed Raspberry Pi case prototypes

There’s no substitute for getting hands-on

Back to the prototype! Once the prototype design is agreed, we work with 3D CAD tools and progress the design towards a manufacturable solution, collaborating closely with injection moulding manufacturing partners T-Zero to optimise the design for production efficiency and quality of detailing.

One important aspect that underpins all our design work is that we always start with consideration for the people we are designing for – whether that’s a home user setting up a media centre, an IT professional using Raspberry Pi as a web server, a group of schoolchildren building a weather station, or a parent looking to encourage their kid to code.

Engagement with the informed, proactive and enthusiastic online Raspberry Pi community is a tremendous asset. The instant feedback, comments, ideas and scrutiny posted on Raspberry Pi forums is powerful and healthy; we listen and learn from this, taking the insight we gain into each new product that we develop. Of course, with such a wide and diverse community, it’s not easy to please everyone all of the time, but that won’t stop us trying – keep your thoughts and feedback coming to PRifeedback@kinneirdufort.com!

If you’d like to know more about KD, or the projects we work on, check out our blog posts and podcasts at www.kinneirdufort.com.

The post Designing distinctive Raspberry Pi products appeared first on Raspberry Pi.



Source: Raspberry Pi – Designing distinctive Raspberry Pi products