Lateo.net - Flux RSS en pagaille (pour en ajouter : @ moi)

🔒
❌ À propos de FreshRSS
Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
Hier — 19 septembre 2019Raspberry Pi

Create a Scramble-style scrolling landscape | Wireframe issue 22

Par Ryan Lambie

Weave through a randomly generated landscape in Mark Vanstone’s homage to the classic arcade game Scramble.

Scramble was developed by Konami and released in arcades in 1981. Players avoid terrain and blast enemy craft.

Konami’s Scramble

In the early eighties, arcades and sports halls rang with the sound of a multitude of video games. Because home computers hadn’t yet made it into most households, the only option for the avid video gamer was to go down to their local entertainment establishment and feed the machines with ten pence pieces (which were bigger then). One of these pocket money–hungry machines was Konami’s Scramble — released in 1981, it was one of the earliest side-scrolling shooters with multiple levels.

The Scramble player’s jet aircraft flies across a randomly generated landscape (which sometimes narrows to a cave system), avoiding obstacles and enemy planes, bombing targets on the ground, and trying not to crash. As the game continues, the difficulty increases. The player aircraft can only fly forward, so once a target has been passed, there’s no turning back for a second go.

Code your own scrolling landscape

In this example code, I’ll show you a way to generate a Scramble-style scrolling landscape using Pygame Zero and a couple of additional Pygame functions. On early computers, moving a lot of data around the screen was very slow — until dedicated video hardware like the blitter chip arrived. Scrolling, however, could be achieved either by a quick shuffle of bytes to the left or right in the video memory, or in some cases, by changing the start address of the video memory, which was even quicker.

Avoid the roof and the floor with the arrow keys. Jet graphic courtesy of TheSource4Life at opengameart.org.

For our scrolling, we can use a Pygame surface the same size as the screen. To get the scrolling effect, we just call the scroll() function on the surface to shift everything left by one pixel and then draw a new pixel-wide slice of the terrain. The terrain could just be a single colour, but I’ve included a bit of maths-based RGB tinkering to make it more colourful. We can draw our terrain surface over a background image, as the SRCALPHA flag is set when we create the surface. This is also useful for detecting if the jet has hit the terrain. We can test the pixel from the surface in front of the jet: if it’s not transparent, kaboom!

The jet itself is a Pygame Zero Actor and can be moved up and down with the arrow keys. The left and right arrows increase and decrease the speed. We generate the landscape in the updateLand() and drawLand() functions, where updateLand() first decides whether the landscape is inclining or declining (and the same with the roof), making sure that the roof and floor don’t get too close, and then it scrolls everything left.

Each scroll action moves everything on the terrain surface to the left by one pixel.

The drawLand() function then draws pixels at the right-hand edge of the surface from y coordinates 0 to 600, drawing a thin sliver of roof, open space, and floor. The speed of the jet determines how many times the landscape is updated in each draw cycle, so at faster speeds, many lines of pixels are added to the right-hand side before the display updates.

The use of randint() can be changed to create a more or less jagged landscape, and the gap between roof and floor could also be adjusted for more difficulty. The original game also had enemy aircraft, which you could make with Actors, and fuel tanks on the ground, which could be created on the right-hand side as the terrain comes into view and then moved as the surface scrolls. Scramble sparked a wave of horizontal shooters, from both Konami and rival companies; this short piece of code could give you the basis for making a decent Scramble clone of your own:

Here’s Mark’s code, which gets a Scramble-style scrolling landscape 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 22

You can read more features like this one in Wireframe issue 22, available now at Tesco, WHSmith, and 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 22 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 Create a Scramble-style scrolling landscape | Wireframe issue 22 appeared first on Raspberry Pi.

À partir d’avant-hierRaspberry Pi

Using data to help a school garden

Par Alex Bate

Chris Aviles, aka the teacher we all wish we’d had when we were at school, discusses how his school is in New Jersey is directly linking data with life itself…

Over to you, Chris.

Every year, our students take federal or state-mandated testing, but what significant changes have we made to their education with the results of these tests? We have never collected more data about our students and society in general. The problem is most people and institutions do a poor job interpreting data and using it to make meaningful change. This problem was something I wanted to tackle in FH Grows.

FH Grows is the name of my seventh-grade class, and is a student-run agriculture business at Knollwood Middle School in Fair Haven, New Jersey. In FH Grows, we sell our produce both online and through our student-run farmers markets. Any produce we don’t sell is donated to our local soup kitchen. To get the most out of our school gardens, students have built sensors and monitors using Raspberry Pis. These sensors collect data which then allows me to help students learn to better interpret data themselves and turn it into action.

Turning data into action

In the greenhouse, our gardens, and alternative growing stations (hydroponics, aquaponics, aeroponics) we have sensors that log the temperature, humidity, and other important data points that we want to know about our garden. This data is then streamed in real time, online at FHGrows.com. When students come into the classroom, one of the first things we look at is the current, live data on the site and find out what is going on in our gardens. Over the course of the semester, students are taught about the ideal growing conditions of our garden. When looking at the data, if we see that the conditions in our gardens aren’t ideal, we get to work.

If we see that the greenhouse is too hot, over 85 degrees, students will go and open the greenhouse door. We check the temperature a little bit later, and if it’s still too hot, students will go turn on the fan. But how many fans do you turn on? After experimenting, we know that each fan lowers the greenhouse temperature between 7-10 degrees Fahrenheit. Opening the door and turning on both fans can bring a greenhouse than can push close to 100 degrees in late May or early June down to a manageable 80 degrees.

Turning data into action can allow for some creativity as well. Over-watering plants can be a real problem. We found that our plants were turning yellow because we were watering them every day when we didn’t need to. How could we solve this problem and become more efficient at watering? Students built a Raspberry Pi that used a moisture sensor to find out when a plant needed to be watered. We used a plant with the moisture sensor in the soil as our control plant. We figured that if we watered the control plant at the same time we watered all our other plants, when the control plant was dry (gave a negative moisture signal) the rest of the plants in the greenhouse would need to be watered as well.

Chris Aviles Innovation Lab Raspberry Pi Certified Educator

This method of determining when to water our plants worked well. We rarely ever saw our plants turn yellow from overwatering. Here is where the creativity came in. Since we received a signal from the Raspberry Pi when the soil was not wet enough, we played around with what we could do with that signal. We displayed it on the dashboard along with our other data, but we also decided to make the signal send as an email from the plant. When I showed students how this worked, they decided to write the message from the plant in the first person. Every week or so, we received an email from Carl the Control Plant asking us to come out and water him!

 

If students don’t honour Carl’s request for water, use data to know when to cool our greenhouse, or had not done the fan experiments to see how much cooler they make the greenhouse, all our plants, like the basil we sell to the pizza places in town, would die. This is the beauty of combining data literacy with a school garden: failure to interpret data then act based on their interpretation has real consequences: our produce could die. When it takes 60-120 days to grow the average vegetable, the loss of plants is a significant event. We lose all the time and energy that went into growing those plants as well as lose all the revenue they would have brought in for us. Further, I love the urgency that combining data and the school garden creates because many students have learned the valuable life lesson that not making a decision is making a decision. If students freeze or do nothing when confronted with the data about the garden, that too has consequences.

Using data to spot trends and make predictions

The other major way we use data in FH Grows is to spot trends and make predictions. Different to using data to create the ideal growing conditions in our garden every day, the sensors that we use also provide a way for us to use information about the past to predict the future. FH Grows has about two years’ worth of weather data from our Raspberry Pi weather station (there are guides online if you wish to build a weather station of your own). Using weather data year over year, we can start to determine important events like when it is best to plant our veggies in our garden.

For example, one of the most useful data points on the Raspberry Pi weather station is the ground temperature sensor. Last semester, we wanted to squeeze in a cool weather grow in our garden. This post-winter grow can be done between March and June if you time it right. Getting an extra growing cycle from our garden is incredibly valuable, not only to FH Grows as business (since we would be growing more produce to turn around and sell) but as a way to get an additional learning cycle out of the garden.

So, using two seasons’ worth of ground temperature data, we set out to predict when the ground in our garden would be cool enough to do this cool veggie grow. Students looked at the data we had from our weather station and compared it to different websites that predicted the last frost of the season in our area. We found that the ground right outside our door warmed up two weeks earlier than the more general prediction given by websites. With this information we were able to get a full cool crop grow at a time where our garden used to lay dormant.

We also used our Raspberry Pi to help us predict whether or not it was going to rain over the weekend. Using a Raspberry Pi connected to Weather Underground and previous years’ data, if we believed it would not rain over the weekend we would water our gardens on Friday. If it looked like rain over the weekend, we let Mother Nature water our garden for us. Our prediction using the Pi and previous data was more accurate for our immediate area than compared to the more general weather reports you would get on the radio or an app, since those considered a much larger area when making their prediction.

It seems like we are going to be collecting even more data in the future, not less. It is important that we get our students comfortable working with data. The school garden supported by Raspberry Pi’s amazing ability to collect data is a boon for any teacher who wants to help students learn how to interpret data and turn it into action.
 

Hello World issue 10

Issue 10 of Hello World magazine is out today, and it’s free. 100% free.

Click here to download the PDF right now. Right this second. If you want to be a love, click here to subscribe, again for free. Subscribers will receive an email when the latest issue is out, and we won’t use your details for anything nasty.

If you’re an educator in the UK, click here and you’ll receive the printed version of Hello World direct to your door. And, guess what? Yup, that’s free too!

What I’m trying to say here is that there is a group of hard-working, passionate educators who take the time to write incredible content for Hello World, for free, and you would be doing them (and us, and your students, kids and/or friends) a solid by reading it :)

The post Using data to help a school garden appeared first on Raspberry Pi.

Raspberry Pi interactive wind chimes

Par Alex Bate

Grab yourself a Raspberry Pi, a Makey Makey, and some copper pipes: it’s interactive wind chime time!

Perpetual Chimes

Perpetual Chimes is a set of augmented wind chimes that offer an escapist experience where your collaboration composes the soundscape. Since there is no wind indoors, the chimes require audience interaction to gently tap or waft them and encourage/nurture the hidden sounds within – triggering sounds as the chimes strike one another.

Normal wind chimes pale in comparison

I don’t like wind chimes. There, I said it. I also don’t like the ticking of the second hand of analogue clocks, and I think these two dislikes might be related. There’s probably a name for this type of dislike, but I’ll leave the Googling to you.

Sound designer Frazer Merrick’s interactive wind chimes may actually be the only wind chimes I can stand. And this is due, I believe, to the wonderful sounds they create when they touch, much more wonderful than regular wind chime sounds. And, obviously, because these wind chimes incorporate a Raspberry Pi 3.

Perpetual Chimes is a set of augmented wind chimes that offer an escapist experience where your collaboration composes the soundscape. Since there is no wind indoors, the chimes require audience interaction to gently tap or waft them and encourage/nurture the hidden sounds within — triggering sounds as the chimes strike one another. Since the chimes make little acoustic noise, essentially they’re broken until you collaborate with them.

Follow the Instructables tutorial to create your own!

The post Raspberry Pi interactive wind chimes appeared first on Raspberry Pi.

Raspberry Pi has partnered with Shaun the Sheep!

Par Alex Bate

We’re super excited to announce our new partnership with Studiocanal and Aardman Animations celebrating their new film A Shaun the Sheep Movie: Farmageddon, in cinemas this autumn.

Raspberry Pi has partnered with Shaun the Sheep!

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?

Aardman has created so many characters that the members of Raspberry Pi hold dear in our hearts. From the early days of Morph’s interactions with Tony Hart, or Christmas evenings sat watching the adventures of Wallace and Gromit, through to their grand cinema-screen epics, we all have a soft spot for the wonderful creatures this talented bunch have invented.

So when Aardman approached us to ask if we’d like to be the Educational Partner for their new film A Shaun the Sheep Movie: Farmageddon, we obviously jumped at the chance. Aardman are passionate about education, and we are too, so this really was a no-brainer.

Shaun the Sheep: Mission to Space

Today we are launching the brand-new, global Code Club competition ‘Shaun the Sheep: Mission to Space’.

We’re asking young people in registered Code Clubs across the world to create awe-inspiring animations featuring Shaun the Sheep and his new friend Lu-La’s adventures, by following our specially themed ‘Shaun the Sheep: Mission to Space’ Scratch project guide!

The ‘Shaun the Sheep: Mission to Space’ competition closes October 25 2019, and you can find more information on the Code Club website.

Shaun the Sheep character hunt

For those of you who aren’t in a Code Club, we’re also running a second giveaway here on the Raspberry Pi blog. For your chance to enter, you need to find three characters from the film that we’ve hidden throughout the Raspberry Pi and Code Club websites. Once you’ve found three, fill in this form, and we’ll pick ten winners to receive some A Shaun the Sheep Movie: Farmageddon goodies, including stickers and a pair of Shaun the Sheep ears.

Please note: at least one of the characters you submit must be from the Code Club website, so get hunting!

The closing date for the character hunt is 4 October 2019.

Both competitions are open to everyone, no matter where in the world you are.

We’ll also be uploading the ‘Shaun the Sheep: Mission to Space’ Scratch project to the Raspberry Pi desktops at the Raspberry Pi Store, Cambridge, so make sure you stop by this coming half-term to try your hand at coding your own Shaun the Sheep adventure.

The post Raspberry Pi has partnered with Shaun the Sheep! appeared first on Raspberry Pi.

How you, an adult, can take part in the European Astro Pi Challenge

Par Alex Bate

So, yesterday we announced the launch of the 2019/2020 European Astro Pi Challenge, and adults across the globe groaned with jealousy as a result. It’s OK, we did too.

The Astro Pi Challenge is the coolest thing ever

The European Astro Pi Challenge is ridiculously cool. It’s definitely one of the most interesting, awesome, spectacular uses of a Raspberry Pi in the known universe. Two Raspberry Pis in stellar, space-grade aluminium cases are currently sat aboard the International Space Station, waiting for students in ESA Member States to write code to run on them to take part in the Astro Pi Challenge.

But what if, like us, you’re too old to take part in the challenge? How can you get that great sense of space wonderment when you’re no longer at school?

You’re never too old…even when you’re too old

If you’re too old to take part in the challenge, it means you’re old enough to be a team mentor. Team mentors are responsible for helping students navigate the Astro Pi Challenge, ensuring that everyone is where they’re meant to be, doing what they’re meant to be doing. You’ll also also the contact between the team and us, Raspberry Pi and ESA. You’re basically a team member.

You’re basically taking part.

Mission Zero requires no coding knowledge

Mission Zero requires very little of its participants:

  • They don’t need to have any prior knowledge of coding
  • They don’t need a Raspberry Pi

And while they need an adult to supervise them, said adult doesn’t need any coding experience either.

(Spoiler alert: you’re said adult.)

Instead, you just need an hour to sit down with your team at a computer and work through some directions. And the result? Your team’s completed code will run aboard the International Space Station, and they’ll get a certificate to prove it.

You really have no excuse

If you live in an ESA Member State and know anyone aged 14 years or younger, there is absolutely no reason for them not to take part in Astro Pi Mission Zero. And, since they’re probably not reading this blog post right now, it’s your responsibility to tell them about Astro Pi. This is how you take part in the European Astro Pi Challenge: you become the bearer of amazing news when you sit your favourite kids down and tell them they’re going to be writing code that will run on the International Space Station…IN SPACE!

To find out more about Mission Zero, click here. We want to see you pledging your support to your favourite non-adults, so make sure to tell us you’re going to be taking part by leaving a comment below.

There really is no excuse.

 

 

*ESA Member States: Austria, Belgium, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Luxembourg, the Netherlands, Norway, Poland, Portugal, Romania, Spain, Sweden, Switzerland and the United Kingdom. Residents of Slovenia, Canada, or Malta can also take part.

The post How you, an adult, can take part in the European Astro Pi Challenge appeared first on Raspberry Pi.

Run your code aboard the International Space Station with Astro Pi

Par Alex Bate

Each year, the European Astro Pi Challenge allows students and young people in ESA Member States (or Slovenia, Canada, or Malta) to write code for their own experiments, which could run on two Raspberry Pi units aboard the International Space Station.

The Astro Pi Challenge is a lot of fun, it’s about space, and so that we in the Raspberry Pi team don’t have to miss out despite being adults, many of us mentor their own Astro Pi teams — and you should too!

So, gather your team, stock up on freeze-dried ice cream, and let’s do it again: the European Astro Pi Challenge 2019/2020 launches today!

Luca Parmitano launches the 2019-20 European Astro Pi Challenge

ESA astronaut Luca Parmitano is this year’s ambassador of the European Astro Pi Challenge. In this video, he welcomes students to the challenge and gives an overview of the project. Learn more about Astro Pi: http://bit.ly/AstroPiESA ★ Subscribe: http://bit.ly/ESAsubscribe and click twice on the bell button to receive our notifications.

The European Astro Pi Challenge 2019/2020 is made up of two missions: Mission Zero and Mission Space Lab.

Astro Pi Mission Zero

Mission Zero has been designed for beginners/younger participants up to 14 years old and can be completed in a single session. It’s great for coding clubs or any groups of students don’t have coding experience but still want to do something cool — because having confirmation that code you wrote has run aboard the International Space Station is really, really cool! Teams write a simple Python program to display a message and temperature reading on an Astro Pi computer, for the astronauts to see as they go about their daily tasks on the ISS. No special hardware or prior coding skills are needed, and all teams that follow the challenge rules are guaranteed to have their programs run in space!

Astro Pi Mission Zero logo

Mission Zero eligibility

  • Participants must be no older than 14 years
  • 2 to 4 people per team
  • Participants must be supervised by a teacher, mentor, or educator, who will be the point of contact with the Astro Pi team
  • Teams must be made up of at least 50% team members who are citizens of an ESA Member* State, or Slovenia, Canada, or Malta

Astro Pi Mission Space Lab

Mission Space Lab is aimed at more experienced/older participants up to 19 years old, and it takes place in 4 phases over the course of 8 months. The challenge is to design and write a program for a scientific experiment to be run on an Astro Pi computer. The best experiments will be deployed to the ISS, and teams will have the opportunity to analyse and report on their results.

Astro Pi Mission Space Lab logo

Mission Space Lab eligibility

  • Participants must be no older than 19 years
  • 2 to 6 people per team
  • Participants must be supervised by a teacher, mentor, or educator, who will be the point of contact with the Astro Pi team
  • Teams must be made up of at least 50% team members who are citizens of an ESA Member State*, or Slovenia, Canada, or Malta

How to plan your Astro Pi Mission Space Lab experiment

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?

For both missions, each member of the team has to be at least one of the following:

  • Enrolled full-time in a primary or secondary school in an ESA Member State, or Slovenia, Canada, or Malta
  • Homeschooled (certified by the National Ministry of Education or delegated authority in an ESA Member State or Slovenia, Canada, or Malta)
  • A member of a club or after-school group (such as Code Club, CoderDojo, or Scouts) located in an ESA Member State*, or Slovenia, Canada, or Malta

Take part

To take part in the European Astro Pi Challenge, head over to the Astro Pi website, where you’ll find more information on how to get started getting your team’s code into SPACE!

Obligatory photo of Raspberry Pis floating in space!

*ESA Member States: Austria, Belgium, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Luxembourg, the Netherlands, Norway, Poland, Portugal, Romania, Spain, Sweden, Switzerland and the United Kingdom

The post Run your code aboard the International Space Station with Astro Pi appeared first on Raspberry Pi.

Gamified boxing with Pi Fighter

Par Rob Zwetsloot

Gamifying boxing with a special punchbag that allows you to fight Luke Skywalker? Rob Zwetsloot starts a training montage to check it out.

Not Rob

Street Fighter

Did you know that the original version of Street Fighter had a variant where you could punch the buttons to get Ryu to attack? The harder you smacked the kick button, the more damage it would do. These apparently wore out very quickly, which is why watching Street Fighter tournaments these days is akin to watching someone playing the piano. Albeit with six buttons and a joystick.

What if you could bring this back? And combine it with other arcade classics and staples? Meet Richard Kirby’s Pi Fighter.

A new challenger!

“Pi Fighter is essentially a real-world old-school fighting video game,” Richard tells us. “The player chooses an opponent and challenges them to a sparring match. Each player has a certain number of health points that decrement each time the other player lands an attack. Instead of clicking a joystick or mouse button, the player hits a heavy bag. The strength of the hit is measured by an accelerometer. [A Raspberry] Pi translates the acceleration of the heavy bag (measured in G) into the number of health points to decrement from the opponent. [Raspberry] Pi runs your opponent, which attacks you — you don’t actually get hit, but your health points decrement each time they attack.”

Use a heavy bag to get a good workout and a good idea of your punch strength, Rocky IV style

It’s a remarkably simple idea, and it started off as just an app that used a smartphone’s accelerometer. Translating that to a Raspberry Pi is just a case of adding an accelerometer of its own.

3… 2… 1… Fight!

“I realised it could be used to measure the overall strength of a punch, but it was hard to know how that would translate into an actual punch, hence the idea to use a heavy bag,” Richard explains. “This appealed to me as I studied karate and always enjoyed hitting a heavy bag. It is always difficult to gauge your own strength, so I thought it would be useful to actually measure the force. The project ended up consuming a good amount of time, as you would expect when you are learning.”

Finish them?

While Pi Fighter is already used at events, Richard says “[i]t needs a bit of tuning and coding to get everything right […]. It could be a never-ending project for me. You can always fix things and make the software more robust, the user interface more usable, etc. It isn’t mass-rollout ready, but I have never had it fail at a key moment such as presenting at a Raspberry Jam or Raspberry Pint. It (mostly) gets better every time I put some effort into it.”

If you find yourself at Raspberry Pint in London, make sure to do a bit of a warm-up first — you might find yourself head-to-head in a boxing match with a Jedi. Here’s hoping they don’t know Teräs Käsi.

The post Gamified boxing with Pi Fighter appeared first on Raspberry Pi.

Raspberry Pi in space!

Par Alex Bate

We love ‘Raspberry Pi + space’ stuff. There, I’ve said it. No taksies backsies.

From high-altitude balloon projects transporting Raspberry Pis to near space, to our two Astro Pi units living aboard the International Space Station, we simply can’t get enough.

Seriously, if you’ve created anything space-related using a Raspberry Pi, please tell us!

Capturing Earth from low orbit

Surrey Satellite Technology Ltd (SSTL) sent a Raspberry Pi Zero to space as part of their Demonstration of Technology (DoT-1) satellite, launched aboard a Soyuz rocket in July.

Earth captured from Low Earth Orbit by a Raspberry Pi

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?

So, not that we’re complaining, but why did they send the Raspberry Pi Zero to space to begin with? Well, why not? As SSTL state:

Whilst the primary objective of the 17.5kg self-funded DoT-1 satellite is to demonstrate SSTL’s new Core Data Handling System (Core-DHS), accommodation was made available for some additional experimental payloads including the Raspberry Pi camera experiment which was designed and implemented in conjunction with the Surrey Space Centre.

Essentially, if you can fit a Raspberry Pi into your satellite, you should.

Managing Director of SSTL Sarah Parker went on to say that “the success of the Raspberry Pi camera experiment is an added bonus which we can now evaluate for future missions where it could be utilised for spacecraft ‘selfies’ to check the operation of key equipments, and also for outreach activities.”

SSTL’s very snazzy-looking Demonstration of Technology (DoT-1) satellite

The onboard Raspberry Pi Zero was equipped with a Raspberry Pi Camera Module and a DesignSpark M12 Mount Lens. Image data captured on the space-bound Raspberry Pi was sent back to the SSTL ground station via the Core-DHS.

So, have you sent a Raspberry Pi to space? Or anywhere else we wouldn’t expect a Raspberry Pi to go? Let us know in the comments!

The post Raspberry Pi in space! appeared first on Raspberry Pi.

Say hello to Isaac Computer Science

Par Dan Fisher

We are delighted to co-launch Isaac Computer Science, a new online platform for teachers and students of A level Computer Science.

Introducing Isaac Computer Science

Introducing the new Isaac Computer Science online learning platform and calendar of free events for students and teachers. Be the first to know about new features and content on the platform: Twitter – ncce.io/ytqstw Instagram – ncce.io/ytqsig Facebook – ncce.io/ytqsfb If you are a teacher, you may also be interested in our free online training courses for GCSE Computer Science teachers.

The project is a collaboration between the Raspberry Pi Foundation and the University of Cambridge, and is funded by the Department for Education’s National Centre for Computing Education programme.

Isaac Computer Science

Isaac Computer Science gives you access to a huge range of online learning materials for the classroom, homework, and revision — all for free.

The platform’s resources are mapped to the A level specifications in England (including the AQA and OCR exam boards). You’ll be able to set assignments for your students, have the platform mark it for you, and be confident that the content is relevant and high quality. We are confident that this will save you time in planning lessons and setting homework.

“Computer Science is a relatively small subject area and teachers across the country often work alone without the support of colleagues. Isaac Computer Science will build a teaching and learning community to support teachers at all levels and will offer invaluable support to A level students in their learning journey. As an experienced teacher, I am very excited to have the opportunity to work on this project.”
– Diane Dowling, Isaac Computer Science Learning Manager and former teacher

And that’s not all! To further support you, we are also running free student workshops and teacher CPD events at universities and schools around England. Tickets for the events are available to book through the Isaac Computer Science website.

“Isaac Computer Science helped equip me with the skills to teach A level, and ran a great workshop at one of their recent Discovery events using the micro:bit and the Kitronik :MOVE mini. This is a session that I’ll definitely be using again and again.”
 – James Spencer, Computer Science teacher at St Martin’s School

A teacher works with her students at our recent Discovery event in Cambridge.

Why sign up?

Isaac Computer Science provides:

  • High-quality materials written by experienced teachers
  • Resources mapped to the AQA and OCR specifications
  • CPD events for teachers
  • Workshops for students

Isaac Computer Science allows you to:

  • Plan lessons around high-quality content pages, thus saving time
  • Select and set self-marking homework questions
  • Pinpoint areas to work on with your students
  • Manage students’ progress in your personal markbook

Start using Isaac Computer Science today:

  • Sign up at isaaccomputerscience.org
  • Request a teacher account and register your students
  • Start using the platform in your classroom!

The post Say hello to Isaac Computer Science appeared first on Raspberry Pi.

A rather snazzy Raspberry Pi 4 wallpaper for your phone and computer

Par Alex Bate

Fiacre took a rather snazzy photo of a Raspberry Pi 4, and he liked it so much that he set it as his iPhone’s wallpaper.

And we liked it so much that we asked him to produce size variants so we could share them with all of you.

You’ll find three variants of the image below: smartphone, 1920×1200, 4K. Just click on the appropriate image to be redirected to the full-resolution version.

Standard rules apply: these images are for personal use only and are not to be manipulated or sold.

Should we create more snazzy wallpapers of Raspberry Pi? Lets us know in the comments, and we’ll get Fiacre to work.

The post A rather snazzy Raspberry Pi 4 wallpaper for your phone and computer appeared first on Raspberry Pi.

Save the date for Coolest Projects 2020

Par Alex Bate

Coolest Projects is the world’s leading technology fair for young people. It’s our event series where young creators, makers, and innovators share their projects with fellow creators and the public, and they explore each others’ work. And it’s awesome!

Launching Coolest Projects 2020!

Coolest Projects is a world-leading showcase that enables and inspires the next generation of digital creators and innovators to present the projects that they have created with code. Find out more: http://coolestprojects.org/ Sign up for the latest Coolest Projects news: http://eepurl.com/dG4UJb

Coolest Projects 2020

In 2020, we’ll run three Coolest Projects events:

  • USA, Discovery Cube Orange County, CA: 7 March 2020
  • UK, The Sharp Project, Manchester: 4 April 2020
  • International, RDS Main Hall, Dublin, Ireland: 6 June 2020

Mark the dates of the UK, USA, and International events in your diary today! Our community also runs regional Coolest Projects events in Belgium, Malaysia, and beyond.

Get involved in Coolest Projects

Visit a Coolest Projects event

You’ll get to see first-hand what the next generation is creating with technology. Young people in our community are brimming with new, cutting-edge ideas and enjoy expressing their creativity through making digital projects.

You’ll also get to flex your own technical and maker skills: our Coolest Projects events have a Discovery Zone, where the maker community and local organisations run unique, hands-on activities!

Support a young person to participate

If you’re an educator, maker, or tech professional, you can support young people you know to participate, as individuals or in teams with their friends. Whether you know young tech enthusiasts through Code Club, CoderDojo, another club, or your school — anyone aged 7–18 can enter Coolest Projects, and you can help them get showcase-ready!

Check out our ‘How to make a project’ workbook, which is perfect for supporting young people through the project building process step by step.

Encourage your company to become a partner or give a donation

Help us continue to make Coolest Projects events free to enter and attend for young people so they can dream big and be inspired by their peers’ creations!

Email partners@raspberrypi.org to learn more about supporting Coolest Projects.

Stay up to date

Project registration and visitor tickets aren’t available just yet — sign up to the Coolest Projects newsletter to be the first to hear when we launch them!

The post Save the date for Coolest Projects 2020 appeared first on Raspberry Pi.

Control a vintage Roland pen plotter with Raspberry Pi

Par Alex Bate

By refitting a vintage Roland DG DXY-990 pen plotter using Raspberry Pi, the members of Liege Hackerspace in Belgium have produced a rather nifty build that writes out every tweet mentioning a specific hashtag.

Liege Hackerspace member u/iooner first shared an image of the plotter yesterday, and fellow Redditors called for video of the project in action immediately.

Watch the full video here. And to see the code code for the project, visit the Liege Hackerspace GitHub.

The post Control a vintage Roland pen plotter with Raspberry Pi appeared first on Raspberry Pi.

Picademy Bytes: free physical computing training for teachers

Par Alex Bate

Five years ago, the Raspberry Pi Foundation recognised a need for free, high-quality CPD for educators. In response, we started running Picademy, a two-day training event that provides educators all over the UK and North America with the knowledge and skills they need to teach computing with confidence, creativity, and excitement.

We are delighted to now bring you a new free training programme called Picademy Bytes for teachers in the UK who are unable to attend the two-day Picademy events. Picademy Bytes training sessions are 60- to 90-minute community-led events taking place at various UK locations, led by Community Trainers who we ourselves have inducted.

The aim of Picademy Bytes is to highlight the value of delivering curriculum objectives through physical computing activities: the programme provides teachers with the opportunity to experiment with physical computing in a short, face-to-face training session. Teachers can then take what they’ve learned back to their schools, to use or adapt for their own Computing lessons.

Introducing our Community Trainers

In June this year, we invited our first four Community Trainers to attend an induction session, where we introduced them to the resources for their Picademy Bytes sessions, and they gave us feedback on our plans and the session content.


All four Community Trainers are teachers and Raspberry Pi Certified Educators, having attended Picademy in the past. They volunteered to become Community Trainers because they are enthusiastic to help other teachers in their local areas to deliver exciting learning experiences for their students.

The first Picademy Bytes session took place in July at the Computer Science in Schools Conference 2019 at Staffordshire University in Stoke-on-Trent, and most attendees were secondary school teachers. Attendees described the session as “well-balanced [between] theory and practical” and said that it was “very informative and provided ideas for the classroom”.

Look out for Picademy Bytes sessions in a city near you!

Upcoming Picademy Bytes sessions will soon be listed on the Computing at School website and on the Raspberry Pi Foundation website. If you are based in or near Belfast, Bradford, South Wales, Hull, London, North Devon, or Plymouth, look out for events near you from this month! And there will be plenty more events in locations across the UK after that. We look forward to seeing you there!

The post Picademy Bytes: free physical computing training for teachers appeared first on Raspberry Pi.

Controlling a boom lift with a Raspberry Pi

Par Alex Bate

Do you have a spare Raspberry Pi lying around? And a Bluetooth games controller? Do you have access to boom lifts or other heavy machinery?

Well, then we most certainly (do not) have the project for you.

Allow us to introduce what is (possibly, probably, hopefully) the world’s first Raspberry Pi–controlled boom lift. Weighing in at 13,000lb, this is the epitome of DON’T try this at home.

Please don’t!

Raspberry Pi-controlled boom lift

Shared on Reddit over the weekend, u/Ccundiff12’s project received many an upvote and concerned comment, but, as the poster explains, hacking the boom is a personal project for personal use to fix a specific problem — thankfully not something built for the sake of having some fun.

Meet STRETCH. Circa 1989 Genie Boom that I bought (cheap) from a neighbor. I use it to trim trees around my property. Its biggest problem was that it always got stuck. It’s not really an off-road vehicle. It used to take two people to move it around… one to drive the lift, and the other to push it with the tractor when it lost traction. The last time it got stuck, I asked my wife to assist by driving one of the two…….. the next day I started splicing into the control system. Now I can push with the tractor & run the boom via remote!

Visit the original Reddit post for more information on the build. And remember: please do not try this at home.

The post Controlling a boom lift with a Raspberry Pi appeared first on Raspberry Pi.

Recreate Super Sprint’s top-down racing | Wireframe issue 21

Par Ryan Lambie

Making player and computer-controlled cars race round a track isn’t as hard as it sounds. Mark Vanstone explains all.

The original Super Sprint arcade machine had three steering wheels and three accelerator pedals.

From Gran Trak 10 to Super Sprint

Decades before the advent of more realistic racing games such as Sega Rally or Gran Turismo, Atari produced a string of popular arcade racers, beginning with Gran Trak 10 in 1974 and gradually updated via the Sprint series, which appeared regularly through the seventies and eighties. By 1986, Atari’s Super Sprint allowed three players to compete at once, avoiding obstacles and collecting bonuses as they careened around the tracks.

The original arcade machine was controlled with steering wheels and accelerator pedals, and computer-controlled cars added to the racing challenge. Tracks were of varying complexity, with some featuring flyover sections and shortcuts, while oil slicks and tornadoes posed obstacles to avoid. If a competitor crashed really badly, a new car would be airlifted in by helicopter.

Code your own Super Sprint

So how can we make our own Super Sprint-style racing game with Pygame Zero? To keep this example code short and simple, I’ve created a simple track with a few bends. In the original game, the movement of the computer-controlled cars would have followed a set of coordinates round the track, but as computers have much more memory now, I have used a bitmap guide for the cars to follow. This method produces a much less predictable movement for the cars as they turn right and left based on the shade of the track on the guide.

Four Formula One cars race around the track. Collisions between other cars and the sides of the track are detected.

With Pygame Zero, we can write quite a short piece of code to deal with both the player car and the automated ones, but to read pixels from a position on a bitmap, we need to borrow a couple of objects directly from Pygame: we import the Pygame image and Color objects and then load our guide bitmaps. One is for the player to restrict movement to the track, and the other is for guiding the computer-controlled cars around the track.

Three bitmaps are used for the track. One’s visible, and the other two are guides for the cars.

The cars are Pygame Zero Actors, and are drawn after the main track image in the draw() function. Then all the good stuff happens in the update() function. The player’s car is controlled with the up and down arrows for speed, and the left and right arrows to change the direction of movement. We then check to see if any cars have collided with each other. If a crash has happened, we change the direction of the car and make it reverse a bit. We then test the colour of the pixel where the car is trying to move to. If the colour is black or red (the boundaries), the car turns away from the boundary.

The car steering is based on the shade of a pixel’s colour read from the guide bitmap. If it’s light, the car will turn right, if it’s dark, the car will turn left, and if it’s mid-grey, the car continues straight ahead. We could make the cars stick more closely to the centre by making them react quickly, or make them more random by adjusting the steering angle more slowly. A happy medium would be to get the cars mostly sticking to the track but being random enough to make them tricky to overtake.

Our code will need a lot of extra elements to mimic Atari’s original game, but this short snippet shows how easily you can get a top-down racing game working in Pygame Zero:

Here’s Mark’s code, which gets a Super Sprint-style racer 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 21

You can read more features like this one in Wireframe issue 21, 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 21 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 news stand pricing!

The post Recreate Super Sprint’s top-down racing | Wireframe issue 21 appeared first on Raspberry Pi.

Raspberry Pi 4: a full desktop replacement?

Par Rob Zwetsloot

The MagPi magazine puts Raspberry Pi 4 to the ultimate test as writer and all-round tech tinkerer PJ Evans uses it for a week as his desktop computer.

When Raspberry Pi 4 was launched earlier in 2019, the significant improvements in processor speed, data throughput, and graphics handling lead to an interesting change of direction for this once humble small computer. Although it’s impressive that you can run a full Linux operating system on a $35 device, a lot of people were just using their Raspberry Pi to get Scratch or Python IDLE up and running. Many people were skipping the graphical side altogether and using smaller models, such as Raspberry Pi Zero, for projects previously covered by Arduino and other microcontrollers.

Raspberry Pi desktop experience

Raspberry Pi 4 was different. Tellingly, the Raspberry Pi Foundation released a new all-in-one kit and named it the Desktop Kit. For the first time truly in Raspberry Pi history, the new model was considered powerful enough to be used as a daily computer without any significant compromise. Challenge accepted. We asked PJ Evans to spend a week using a Raspberry Pi 4 as his only machine. Here’s what happened.

Day 1 | Monday

Decisions, decisions

Our new favourite single-board computer comes in a selection of RAM sizes: 1GB, 2GB, or 4GB. Given a price difference of £20 between the 1GB and 4GB versions, it made sense to go right for the top specification. That’s the version included in the official Desktop Kit that I went out and bought for £105 (inc. VAT) at the official Raspberry Pi store; it normally retails for $120 plus local taxes. My last laptop was £1900. I’m not suggesting that the two can be reasonably compared in terms of performance, but £1795 minus the cost of a monitor is a difference worth remarking upon.

Back at the office, I inspected the contents. For your money you get: a 4GB version of Raspberry Pi 4, thoughtfully already installed in the new official case; the official keyboard and mouse; the new USB-C power supply; a 16GB microSD card preloaded with the Raspbian Buster operating system; and a copy of The Official Raspberry Pi Beginner’s Guide 252-page book. It’s very well packaged and presented, with little plastic waste. The book is the icing on the cake if you are looking at this set for a young person’s first computer, short-circuiting the ‘now what do I do?’ stage. What pleased me, in particular, was the inclusion of two micro-HDMI cables in the kit, allowing me to set up a dual-screen system without delay.

First tests

I set up my new workstation next to my existing laptop, with two 1080p monitors that only had DVI connectors, so I had to get a couple of £2 adapters and an additional cable to get sound out of the audio jack of my Raspberry Pi. Time for an initial test-drive. Booting up into Raspbian Buster was quick, about ten seconds, and connection to WiFi easy. There’s no doubting the feel of the speed improvements. Yes, I’ve read all the benchmark tests, but I wanted to know how that translates to user experience. This new kit does not disappoint.

Raspbian has matured impressively as an OS. For my daily desktop scenario, the jewel in the crown is Chromium: having such a capable web browser is what makes this whole experiment feasible. Others have upped their game, too: Firefox has come a long way, and many other browsers are now available, such as Vivaldi. A check of some of my most visited sites showed Chromium to be just as capable as Chrome on my regular machine. Unsurprisingly, it wasn’t as snappy and I hit a few bumps, but we’ll get to that.

A day of impressions

I’m no expert when it comes to GPUs, but I was impressed with the dual-monitor support. The setup worked first time and didn’t seem to have any detrimental effect on the machine’s performance. I was expecting slow window drawing or things getting ‘stuck’, but this wasn’t the case.

By the end of the first day, I was getting used to the keyboard and mouse too. They are a nice mixture of being both functional and aesthetically pleasing. The keyboard comes with a three-port hub, so you can connect the mouse if you wish. It does not have the build quality and precision of my daily wireless keyboard and trackpad, but for a fraction of the price, I was surprised how much I got for my money. By the end of the week, I’d grown quite fond of it.

Day 2 | Tuesday

Back to basics…


If you’d like to see what PJ got up to for the rest of his week spent using Raspberry Pi as a desktop replacement, head over to The MagPi magazine’s website, where you can either buy the magazine with international home delivery or download the PDF for FREE!

The MagPi magazine is also available from most high street newsagents in the UK, or from the Raspberry Pi store in Cambridge.

What we’re trying to say, dear reader, is that there is absolutely no reason for you not to read the rest of this article. And when you have, let us know what you thought of it in the comments below.

And while we have your attention, here’s the latest video from The MagPi — a teaser of their review for the rather nifty RockyBorg, available now from PiBorg.

RockyBorg: the £99 Raspberry Pi robot!

Power. Performance. Pint-sized. The new RockyBorg has it all. Read our review in The MagPi 85: https://magpi.cc/get85 Would you like a FREE #RaspberryPi? Subscribe today to twelve months print subscription! You can see all our subscription offers on The MagPi magazine website: https://magpi.cc/subscribe

The post Raspberry Pi 4: a full desktop replacement? appeared first on Raspberry Pi.

Help us make it easier for you to design products with Raspberry Pi

Par Roger Thornton

We want to improve the way we support companies that design with Raspberry Pi computers, and we need your help to do it.

Raspberry Pi’s success is thanks to the community that exists around it.  When we launched Raspberry Pi 4, our most powerful computer yet, we gave our community the chance to ask our engineers all about the new product.

A shiny Raspberry Pi 4 on a flat white surface, viewed at an angle

Now we’d like to turn the tables and ask you some questions as we work to improve the support we offer to people and organisations that design using Raspberry Pi.

If you have experience of designing products or industrial solutions that use Raspberry Pi, we would love to hear from you.

Raspberry Pi in products

Raspberry Pi has been used to power products from Compute Module-based industrial controllers made by Kunbus

Three smart, compact orange and grey RevPi Core 3 enclosures mounted on a din rail

…to Raspberry Pi-based washing machines with Raspberry Pi touchscreen displays from Marathon.

Sleek-looking charcoal grey washing machine with a dark red door trim and a large colour display screen

Organisations are increasingly using various kinds of Raspberry Pi computer to power products and solutions, and we want to do more to support designers.

Please help us!

If you have experience as a design consultancy that uses Raspberry Pi computers in products, or if you have used a designer to build a product that includes a Raspberry Pi, we would love to talk to you about it. You will help shape what we offer in the future, and make designing products with Raspberry Pi simple, quick, and powerful.

Get in touch

If you use Raspberry Pi in products or in industrial solutions, I want to talk to you. Please fill in this form with a few details of your experience so we can talk more.

The post Help us make it easier for you to design products with Raspberry Pi appeared first on Raspberry Pi.

Keynote speeches from Scratch Conference Europe 2019

Par Alex Bate

This weekend, the Raspberry Pi Foundation hosted Scratch Conference Europe 2019 at Churchill College in Cambridge, UK.

Framing the busy weekend’s schedule were presentations from:

  • Massachusetts Institute of Technology (MIT) Media Lab’s Mitchel Resnick, co-inventor of Scratch himself
  • Science presenter Neil Monterio
  • Raspberry Pi favourite, the fire-loving Fran Scott

Since not everyone was able to travel to Cambridge to attend the conference, we wanted to make sure you’re not missing out, so we filmed their presentations, for you to watch at your leisure.

For the full Scratch Conference experience, we suggest gathering together a group of like-minded people to watch the videos and discuss your thoughts. Alternatively, use #ScratchEurope on Twitter to join in the conversation with the conference attendees online.

Enjoy!

Mitch Resnick presents at Scratch Conference Europe 2019

Mitch Resnick addresses the attendees of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 24 August 2019.

Neil Monteiro presents at Scratch Conference Europe 2019

Neil Monteiro closes the show on day two of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 24 August 2019. In this show, Neil takes the audience on a journey into a dangerous labyrinth…in code!

Fran Scott presents at Scratch Conference Europe 2019

Fran Scott closes the show on day three of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 25 August 2019.

 

The post Keynote speeches from Scratch Conference Europe 2019 appeared first on Raspberry Pi.

Build a xylophone-playing robot | HackSpace magazine #22

Par Alex Bate

HackSpace magazine issue 22 is out now, and our favourite tutorial this month will show you how to make this, a xylophone-playing robot!

Build a glockenspiel-playing robot with HackSpace magazine

Why spend years learning to play a musical instrument when you could program a robot to do it for you? This month HackSpace magazine, we show you how to build a glockenspiel-playing robot. Download the latest issue of HackSpace for free: http://rpf.io/hs22yt Follow HackSpace on Instagram: http://rpf.io/hsinstayt

If programming your own instrument-playing robot isn’t for you, never fear, for HackSpace magazine is packed full of other wonderful makes and ideas, such as:

  • A speaker built into an old wine barrel
  • Free-form LEDs
  • Binary knitwear
  • A Raspberry Pi–powered time machine
  • Mushroom lights
  • A…wait, hold on, did I just say a Raspberry Pi–powered time machine? Hold on…let me just download the FREE PDF and have a closer look. Page 14, a WW2 radio broadcast time machine built by Adam Clark. “I bought a very old, non-working valve radio, and replaced the internals with a Raspberry Pi Zero on a custom 3D-printed chassis.” NICE!

Honestly, this month’s HackSpace is so full of content that it would take me all day to go through everything. But, don’t take my word for it — try it yourself.

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!

Author’s note

Yes, I know it’s a glockenspiel in the video.

The post Build a xylophone-playing robot | HackSpace magazine #22 appeared first on Raspberry Pi.

It’s GCSE results day!

Par Dan Fisher

Today is GCSE results day, and with it comes the usual amount of excitement and trepidation as thousands of young people in the UK find out whether they got the grades they wanted. So here’s a massive CONGRATULATIONS from everyone at the Raspberry Pi Foundation to all the students out there who have worked so hard to get their GCSEs, A levels, BTECs, IBs, and a host of other qualifications.

We also want to highlight the efforts of the amazing teachers who have spent countless hours thinking up new ways to bring their subjects to life and inspire the next generation.

Looking at the initial data from the Department for Education, it’s clear that:

  • The number of students entering the Computer Science GCSE has gone up by 7.6%, so this is the sixth year running that the subject has gained popularity — great news!
  • The number of girls entering the Computer Science GCSE has grown by 14.5% compared to last year!
  • The proportion of Computer Science GCSE students achieving top grades (9 to 7) has gone up, and there’s been an even bigger increase in the proportion achieving a good pass (9 to 4) — amazing!

Views from teachers

From L to R: Rebecca Franks, Allen Heard, Ben Garside, Carrie Anne Philbin

I caught up with four former teachers on our team to reflect on these findings and their own experiences of results days…

What thoughts and emotions are going through your head as a teacher on results day?

Ben: It’s certainly a nerve-wracking time! You hope that your students have reached the potential that you know that they are capable of. You log onto the computer the second you wake up to see if you’ve got access to the exam boards results page yet. It was always great being there to see their faces, to give them a high five, and to support them with working out their options going forward.

Rebecca: I think that head teachers want you to be worried about targets and whether you’ve met them, but as a teacher, when you look at each individual students’ results, you see their journey, and you know how much effort they’ve put in. You are just really proud of how well they have done, and it’s lovely to have those post-results conversations and celebrate with them. It makes it all worth it.

Allen: I liken the feeling to that of an expectant father! You have done as much as you can to make sure things run smoothly, you’ve tried to keep all those involved calm, and now the moment is here and you just want everything to be OK.

Carrie Anne: As a teacher, I always felt both nerves and excitement for results day, probably more so than my students did. Sleepless nights in the run-up to the big day were common! But I always enjoyed seeing my students, who I’d worked with since they were youngsters, see the culmination of their hard work into something useful. I always felt proud of them for how far they’d come.

There has been an increased uptake of students taking computing-related subjects at GCSE since last year. What do you think about this?

Ben: It’s great news and shows that schools are realising how important the subject is to prepare our young people for the future workplace.

Carrie Anne: It’s a sign that our message — that all students should have access to a Computing qualification of rigour, and that there is a willing and ready audience hungry for the opportunity to study Computing at a deeper level — is making traction. My hope is to see this number increase as teachers take part in the free National Centre for Computing Education professional development and certification over the coming years.

Rebecca: I think it’s a step in the right direction, but we definitely have a long way to go. We must make sure that computing is at the forefront of any curriculum model in our secondary schools, which is why the National Centre for Computing Education is so important. In particular, we must support schools in ensuring that KS3 computing is given the time it needs to give students the grounding for GCSE.

Allen: I agree with Rebecca: more needs to be done about teacher training and helping schools see the overall benefit to students in undertaking such subjects. Schools that are investing time in nurturing these subjects in their curriculum provision are seeing them become more popular and enjoying success. Patience is the key for senior leadership teams, and teachers need support and to have confidence in their ability to continue to deliver the subject.

Why is it important that more students learn about computing?

Rebecca: Computing feeds into so much of our everyday lives, and we must prepare our young people for a world that doesn’t exist yet. Computing teaches you logical thinking and problem-solving. These skills are transferable and can be used in all sorts of situations. Computing also teaches you essential digital literacy skills that can help you keep safe whilst using online tools.

Ben: For me, it’s really important that young people pick this subject to help them understand the world around them. They’ll hopefully then be able to see the potential of computing as a power for good and harness it, rather than becoming passive consumers of technology.

Carrie Anne: Following on from what Ben said, I also think it’s important that technology developed in the future reflects the people and industries using it. The tech industry needs to become more diverse in its workforce, and non-technical fields will begin to use more technology in the coming years. If we equip young people with a grounding in computing, they will be equipped to enter these fields and find solutions to technical solutions without relying on a small technical elite.

Imagine I’m a GCSE student who has just passed my Computer Science exams. What resources should I look at if I want to learn more about computing with the Raspberry Pi Foundation for free?

Rebecca: Isaac Computer Science would be the best place to start, because it supports students through their A level Computer Science. If you wanted to experiment and try some physical computing, then you could take a look at the Projects page of the Raspberry Pi Foundation website. You can filter this page by ‘Software type: Python’ and find some ideas to keep you occupied!

Allen: First and foremost, I would advise you to keep your hard-earned coding skills on point, as moving on to the next level of complexity can be a shock. Now is the time to start building on your already sound knowledge and get prepared for A level Computer Science in September. Isaac Computer Science would be a great place to start to undertake some further learning over the summer and prime yourself for further study.

Ben: Same as Rebecca and Allen, I’d be telling you to get started with Isaac Computer Science too. The resources that are being provided for free are second to none, and will really help you get a good feel for what A level Computer Science is all about.

Carrie Anne: Beyond the Raspberry Pi projects site and Isaac Computer Science, I’d recommend getting some face-to-face experience. Every year the Python community holds a conference that’s open to everyone. It’s a great opportunity to meet new people and learn new skills. PyConUK 2019 is taking place in September and has bursaries to support people in full-time education to attend.

We’ve been working on providing support for secondary and GCSE teachers as part of the National Centre for Computing Education this year. Could you talk about the support we’ve got available?

Allen: We’re producing resources to cover the whole range of topics that appear in all the Computing/Computer Science specifications. The aim of these resources is to provide teachers — both experienced and new to the subject — with the support they need to deliver quality, engaging lessons. Founded on sound pedagogical principles and created by a number of well-established teachers, these resources will help reduce workload and increase productivity for teachers, and increase engagement of students. This will ultimately result in some fantastic out-turns for schools, as well as developing confident computing teachers along the way.

Rebecca: As Allen explained, we are busy creating new, free teaching resources for KS3 and GCSE. The units will cover the national curriculum and beyond, and the lessons will be fully resourced. They will be accessible to teachers with varying levels of experience, and there will be lots of support along the way through online courses and face-to-face training if teachers want to know more. Teachers can already take our ‘CS Accelerator’ programme, which is extremely popular and has excellent reviews.

Thanks for your time, everyone!

How was your GCSE results day? Are your students, or young people you know, receiving their results today? Tell us about it in the comments below.

The post It’s GCSE results day! appeared first on Raspberry Pi.

Retrofit a vintage camera flash with a Raspberry Pi Camera Module

Par Alex Bate

Wanting to break from the standard practice of updating old analogue cameras with digital technology, Alan Wang decided to retrofit a broken vintage camera flash with a Raspberry Pi Zero W to produce a video-capturing action cam.

Raspberry Pi Zero Flash Cam Video Test

Full story of this project: https://www.hackster.io/alankrantas/raspberry-pi-zero-flash-cam-359875

By hacking a somewhat gnarly hole into the body of the broken flash unit, Alan fit in the Raspberry Pi Zero W and Camera Module, along with a few other components. He powers the whole unit via a USB power bank.

At every touch of the onboard touchpad, the retrofit camera films 12 seconds of footage and saves it as an MP4 file on the onboard SD card or an optional USB flash drive.

While the project didn’t technically bring the flash unit back to life — as the flash function is still broken — it’s a nice example of upcycling old tech, and it looks pretty sweet. Plus, you can attach it to your existing film camera to produce some cool side-by-side comparison imagery, as seen in the setup above.

For a full breakdown of the build, including the code needed to run the camera, check out the project’s Hackster.io page.

The post Retrofit a vintage camera flash with a Raspberry Pi Camera Module appeared first on Raspberry Pi.

Raspberry Pi summer projects with The MagPi magazine

Par Alex Bate

Take your Raspberry Pi outside for some fun outdoor making with The MagPi magazine’s summer projects feature, available to read now. Right now. Right this second. Go read it…but read the rest of this blog post first. Thanks. #analytics

Digital making outdoors

Sure, there may be a few obstacles in your way whenever you try to complete a digital making project outside. Poor WiFi connections are always a problem, the sun will most certainly glare off your screen, and don’t even get me started on the lack of power supplies. But that’s where The MagPi magazine comes in, providing you with every tip and trick you need to move your making into the fresh air of the great outdoors.

Visit The MagPi magazine’s website, where you’ll be able to download the PDF for free, saving money, time, and trees! Woohoo!

The post Raspberry Pi summer projects with The MagPi magazine appeared first on Raspberry Pi.

Build your own Raspberry Pi night vision camera

Par Alex Bate

A Raspberry Pi Zero W, Pimoroni HyperPixel screen, and Raspberry Pi IR Camera Module are all you need to build this homemade night vision camera.

How to build a night vision camera

How to build a night vision camera, video showing the process and problems that I came across when building this camera

Raspberry Pi night vison camera

Built into the body of an old camera flash, Dan’s Raspberry Pi night vision camera is a homage to a childhood spent sneaking around the levels of Splinter Cell. Says Dan:

The iconic image from the game is the night vision goggles that Sam Fisher wears. I have always been fascinated by the idea that you can see in the dark and this formed the foundation of my idea to build a portable hand-held night vision piece of equipment.

The camera, running on Raspbian, boasts several handy functions, including touchscreen controls courtesy of the Pimoroni HyperPixel, realtime video and image capture, and a viewing distance of two to five metres.

It’s okay to FAIL

Embracing the FAIL (First Attempt In Learning) principle, Dan goes into detail about the issues he had to overcome while building the camera, which is another reason why we really enjoyed this project. It’s okay to fail when trying your hand at digital making, because you learn from your mistakes! Dan’s explanations of the struggles he faced and how he overcame them are 👌.

For a full rundown of the project and tips on building your own, check out its Hackster.io page.

The post Build your own Raspberry Pi night vision camera appeared first on Raspberry Pi.

Scratch 3 Desktop for Raspbian on Raspberry Pi

Par Martin O'Hanlon

You can now install and use Scratch 3 Desktop for Raspbian on your Raspberry Pi!

Scratch 3

Scratch 3 was released in January this year, and since then we and the Scratch team have put lots of work into creating an offline version for Raspberry Pi.

The new version of Scratch has a significantly improved interface and better functionality compared to previous versions. These improvements come at the cost of needing more processing power to run. Luckily, Raspberry Pi 4 has delivered just that, and with the software improvements in the newest version of Raspbian, Buster, we can now deliver a reliable Scratch 3 experience on our computer.

Which Raspberry Pi can I use?

Scratch 3 needs at least 1GB of RAM to run, and we recommend a Raspberry Pi 4 with at least 2GB RAM. While you can run Scratch 3 on a Raspberry Pi 2, 3, 3B+, or a Raspberry 4 with 1GB RAM, performance on these models is reduced, and depending on what other software you run at the same time, Scratch 3 may fail to start due to lack of memory.

The Scratch team is working to reduce the memory requirements of Scratch 3, so we will hopefully see improvements to this soon.

How to install Scratch 3

You can only install Scratch 3 on Raspbian Buster.

First, update Raspbian!

  • If you’ve yet to upgrade to Raspbian Buster, we recommend installing a fresh version of Buster onto your SD card instead of upgrading from your current version of Raspbian.
  • If you’re already using Raspbian Buster, but you’re not sure your running the latest version, update Buster by following this tutorial:

How to update Raspbian on your Raspberry Pi

How to update to the latest version of Raspbian on your Raspberry Pi.

Once you’re running the latest version of Buster, you can install Scratch 3 either using the Recommended Software application or apt on the terminal.

How to install Scratch 3 using the Recommended Software app

Open up the menu, click on Preferences > Recommended Software, and then select Scratch 3 and click on OK.

How to install Scratch 3 using the terminal

Open a terminal window, and type in and run the following commands:

sudo apt-get update
sudo apt-get install scratch3

What can I do with Scratch 3 and Raspberry Pi?

Scratch 3 Desktop for Raspbian comes with new extensions to allow you to control the GPIO pins and Sense HAT with Scratch code!

GPIO extension

GPIO extension is a replacement for the existing extension in Scratch 2. Its layout and functionality is very similar, so you can use it as a drop-in replacement.

The GPIO extension gives you the flexibility to connect and control a whole host of electronic devices.

Simple Electronics extension

If you are looking to add something simple, like an LED or button controller for a game, you should find the new Simple Electronics extension easier to use than the GPIO extension. The Simple Electronics extension is the first version of a beginner-friendly extension for interacting with Raspberry Pi’s GPIO pins. Taking lessons from the implementation of gpiozero for Python, this new extension provides a simpler way of using electronic components: currently buttons and LEDs.

In this example, an LED connected to GPIO pin 17 is controlled by a button connected between pin 2 and GND.

Sense HAT extension

We’ve improved the Sense HAT extension to take advantage of new features in Scratch 3, and the updated version of the extension also introduces a number of new blocks to allow you to:

  • Sense tilting, shaking, and orientation
  • Use the joystick
  • Measure temperature, pressure, and humidity
  • Display text, characters, and patterns on the LED matrix

micro:bit and LEGO extensions

The micro:bit and LEGO extensions will become available later on Scratch 3 Desktop. This is because Scratch Link, the software which allows Scratch to talk to Bluetooth devices, is not yet available for Linux-type operating systems like Raspbian. A version of Scratch Link for Raspbian is part of our plans but, as yet, we don’t have a release date.

A round of thanks

It has been a long ambition of both the Scratch and Raspberry Pi teams to have Scratch 3 running on Raspberry Pi, and it’s amazing to see it released!

A big thank you to Raspberry Pi engineer Simon Long for building and packaging Scratch 3, and to the Scratch team for their support in getting over some of the problems we faced along the way.

The post Scratch 3 Desktop for Raspbian on Raspberry Pi appeared first on Raspberry Pi.

Code your own 2D shooting gallery in Python | Wireframe issue 20

Par Ryan Lambie

Raspberry Pi’s own Rik Cross shows you how to hit enemies with your mouse pointer as they move around the screen.

Duck Hunt made effective use of the NES Zapper, and made a star of its sniggering dog, who’d pop up to heckle you between stages.

Clicky Clicky Bang Bang

Shooting galleries have always been a part of gaming, from the Seeburg Ray-O-Lite in the 1930s to the light gun video games of the past 40 years. Nintendo’s Duck Hunt — played with the NES Zapper — was a popular console shooting game in the early eighties, while titles such as Time Crisis and The House of the Dead kept the genre alive in the 1990s and 2000s.

Here, I’ll show you how to use a mouse to fire bullets at moving targets. Code written to instead make use of a light gun and a CRT TV (as with Duck Hunt) would look very different. In these games, pressing the light gun’s trigger would cause the entire screen to go black and an enemy sprite to become bright white. A light sensor at the end of the gun would then check whether the gun is pointed at the white sprite, and if so, would register a hit. If more than one enemy was on the screen when the trigger was pressed, each enemy would flash white for one frame in turn, so that the gun would know which enemy had been hit.

Our simple shooting gallery in Python. You could try adding randomly spawning ducks, a scoreboard, and more.

Pygame Zero

I’ve used two Pygame Zero event hooks for dealing with mouse input. Firstly, the on_mouse_move() function updates the position of the crosshair sprite whenever the mouse is moved. The on_mouse_down() function reacts to mouse button presses, with the left button being pressed to fire a bullet (if numberofbullets > 0) and the right button to reload (setting numberofbullets to MAXBULLETS).

Each time a bullet is fired, a check is made to see whether any enemy sprites are colliding with the crosshair — a collision means that an enemy has been hit. Luckily, Pygame Zero has a colliderect() function to tell us whether the rectangular boundary around two sprites intersects.

If this helper function wasn’t available, we’d instead need to use sprites’ x and y coordinates, along with width and height data (w and h below) to check whether the two sprites intersect both horizontally and vertically. This is achieved by coding the following algorithm:

  • Is the left-hand edge of sprite 1 further left than the right-hand edge of sprite 2 (x1 < x2+w2)?
  • Is the right-hand edge of sprite 1 further right than the left-hand edge of sprite 2 (x1+w1 > x2)?
  • Is the top edge of sprite 1 higher up than the bottom edge of sprite 2 (y1 < y2+h2)?
  • Is the bottom edge of sprite 1 lower down than the top edge of sprite 2 (y1+h1 > y2)?

If the answer to the four questions above is True, then the two sprites intersect (see Figure 1). To give visual feedback, hit enemies briefly remain on the screen (in this case, 50 frames). This is achieved by setting a hit variable to True, and then decrementing a timer once this variable has been set. The enemy’s deleted when the timer reaches 0.

Figure 1: A visual representation of a collision algorithm, which checks whether two sprites intersect.

As well as showing an enemy for a short time after being hit, successful shots are also shown. A problem that needs to be overcome is how to modify an enemy sprite to show bullet holes. A hits list for each enemy stores bullet sprites, which are then drawn over enemy sprites.

Storing hits against an enemy allows us to easily stop drawing these hits once the enemy is removed. In the example code, an enemy stops moving once it has been hit.

If you don’t want this behaviour, then you’ll also need to update the position of the bullets in an enemy’s hits list to match the enemy movement pattern.

When decrementing the number of bullets, the max() function is used to ensure that the bullet count never falls below 0. The max() function returns the highest of the numbers passed to it, and as the maximum of 0 and any negative number is 0, the number of bullets always stays within range.

There are a couple of ways in which the example code could be improved. Currently, a hit is registered when the crosshair intersects with an enemy — even if they are barely touching. This means that often part of the bullet is drawn outside of the enemy sprite boundary. This could be solved by creating a clipping mask around an enemy before drawing a bullet. More visual feedback could also be given by drawing missed shots, stored in a separate list.

Here’s Rik’s code, which lets you hit enemies with your mouse pointer. To get it running 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 20

You can read more features like this one in Wireframe issue 20, 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 20 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 your own 2D shooting gallery in Python | Wireframe issue 20 appeared first on Raspberry Pi.

10,000 sticker pack giveaway

Par Alex Bate

UPDATE: all 10,000 sticker packs have now been claimed. We honestly didn’t think these would go so quickly. If you’re in a different time zone to us and reading this later during your day, we’re sorry you missed out. We’ll see whether we can run another giveaway in the future at a time that’s better suited for community members in other time zones.

Would you like a Raspberry Pi sticker pack? We’re giving away a whopping 10,000 sticker packs to the first 10,000 people who fill in the form at the bottom of this post.

But before you do that, please read the following guidelines.

Giveaway guidelines

Please:

  • Only fill in the form once, to give as many people as possible the chance to get their hands on a sticker pack. We will ignore duplicate entries.
  • Fill in all the boxes, otherwise we may not be able to get your sticker pack to you.
  • Include your email address so we can follow up with you if we encounter issues with postage. We won’t use your email address for any other reason.
  • Include a postal address you will have access to for at least the next two months, since it may take up to two months for the sticker pack to reach you.
  • All entries must be submitted by 1 September 2019.

We’ll only use your details for this giveaway. All data you enter into the form will be permanently deleted after two months.

It may take until 15 October for your sticker pack to reach you. Please do not contact us before that date to enquire about your stickers.

The post 10,000 sticker pack giveaway appeared first on Raspberry Pi.

Build a Raspberry Pi music box with Sally Le Page

Par Alex Bate

Connecting buttons to the GPIO pins of your Raspberry Pi instantly opens up your digital making to the world of clicky funtimes.

Sally Le Page

Our Music Box project teaches you how to connect several buttons to your Raspberry Pi and write code to make them trigger cool sound effects.

It’s fun. It’s easy. And we roped Sally Le Page into helping us show you how you can do it yourself, in your own home!

Here Sally is, and here’s the link to the updated online project for you to get stuck into.

Build a Raspberry Pi music box ft. Dr Sally Le Page

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?

The post Build a Raspberry Pi music box with Sally Le Page appeared first on Raspberry Pi.

Real-time train station departure board

Par Liz Upton

All across the UK, you’ll find train departure boards on station platforms that look like this:

They’ve looked this way for as long as I can remember (before they were digital dot-matrix displays, they were made from those flappy bits of plastic with letters of the alphabet and numbers printed on them, which whirled round like a Rolodex; they still look very similar). If you’re a frequent train traveller in the UK, you probably have a weird emotional response to seeing one of these. Mine is largely one of panic about being late.

Some people have a more…benign relationship with trains than I do, like Chris Crocker-White, who has adapted a build tweeted by Chris Hutchinson to make a miniature departure board for his desk. Here’s the tweet that started it all:

Chris Hutchinson on Twitter

Pretty hyped about my most recent @Raspberry_Pi project – a realistic, real-time, train departure board I’ve open sourced the software over at: https://t.co/vGQzagsSpi Next step: find a case and make it a permanent fixture! https://t.co/HEXgzdH8TS

Chris C-W’s build is similar, but has a couple of very neat upgrades, including some back-end software work (his build runs in Docker on balenaCloud, to make configuration easier), and some work on the display, which he’s tweaked to use 1:1 pixel mapping of the fonts and avoid any scaling, so the tiny board looks more like the dot-matrix LED displays you’ll see when you visit the station. You can see the difference in the image below:

 

Chris seems to be using his board as a piece of desktop furniture, where it looks terrific, but model train or narrow-gauge enthusiasts should be all over this project too; it’s a lovely way to inject some realism into a miniature setup. You can find a very complete guide to making your own here.

Now, if you’ll excuse me, I have a train to catch.

 

 

The post Real-time train station departure board appeared first on Raspberry Pi.

Use PlayStation Buzz! controllers with a Raspberry Pi

Par Alex Bate

Buzz! was a favourite amongst my university housemates and me. With popular culture questions asked by an animated Jason Donovan, answered using real-life quiz controllers with a big red button, what’s not to like?

But, as with most of the tech available in the early 2000s, my Buzz! controllers now sit in a box somewhere, dusty and forgotten.

That’s why it is so goshdarn delightful to see PiMyLifeUp breathe new life into these awesome-looking games controllers.

Bringing Buzz! back

The tutorial uses the hidapi library to communicate with the controllers, allowing them to control functions through the Raspberry Pi, and the Raspberry Pi to control the LED within the big red button.

By the end of this tutorial, you will have learned how to read information about all your USB devices, learned how to read data that the devices are sending back and also how to write a library that will act as a simple wrapper to dealing with the device.

Aside from the Buzz! controllers, available on eBay or similar for a few pounds, you only need a Raspberry Pi and its essential peripherals to get started, as the controllers connect directly via USB — thanks, Buzz!

PiMyLifeUp’s tutorial is wonderfully detailed, explaining the hows and whys of the lines of code needed to turn your old Buzz! controllers into a quiz game written in Python that uses the coloured buttons to answer multiple-choice questions.

Guitar Hero, dance mats, Donkey Kong Bongos — what other gaming peripherals would you like to bring back to life?

The post Use PlayStation Buzz! controllers with a Raspberry Pi appeared first on Raspberry Pi.

We asked our engineers your Raspberry Pi 4 questions…

Par Alex Bate

We collected some of the most common Raspberry Pi 4 questions asked by you, our community, and sat down with Eben Upton, James Adams, and Gordon Hollingworth to get some answers.

Raspberry Pi 4 Q&A

We grilled our engineers with your Raspberry Pi 4 questions 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?

Do you have more questions about our new board or accessories? Leave them in the comments of our YouTube video, or in the comments below, and we’ll collect some of the most commonly asked questions together for another Q&A session further down the line.

The post We asked our engineers your Raspberry Pi 4 questions… appeared first on Raspberry Pi.

Pulling shower thoughts from Reddit for a Raspberry Pi e-paper display

Par Alex Bate

The Reddit users among you may already be aware of the Shower Thoughts subreddit. For those of you who aren’t, Shower Thoughts is where people go to post the random epiphanies they’ve had about life, the universe, and everything. For example:

YouTuber ACROBOTIC is a fan of the Shower Thoughts subreddit. So much so that they decided to program their Raspberry Pi to update an e-paper HAT with the subreddit’s top posts from the last hour.

Raspberry Pi 4 Scrape JSON Data w/ Python And Display It On e-Paper | reddit /r/showerthoughts

$2 for PCB prototype (any color): https://jlcpcb.com/ ========== * Your support helps me post videos more frequently: https://www.patreon.com/acrobotic https://www.paypal.me/acrobotic https://buymeacoff.ee/acrobotic BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM ========== * Find me on: https://twitter.com/acrobotic https://facebook.com/acrobotic https://instagram.com/acrobotic ========== * Parts & supplies: https://acrobotic.com/shop https://amazon.com/shops/acrobotic ========== In another video we setup a Raspberry Pi to control an e-Paper/e-Ink HAT and running demo code.

For their build, they used a three-colour e-paper display, but you can use any e-paper add-on for Raspberry Pi to recreate the project. They also used Raspberry Pi 4, but again, this project will work with other models — even Raspberry Pi Zero W.

ACROBOTIC created an image to frame the Shower Thoughts posts, which they uploaded to their Raspberry Pi as a .bmp file. They altered prewritten code for using the e-paper display to display this frame image and the various posts.

Adding .json to the URL of the appropriate Shower Thoughts page allows access to the posts in JSON format. Then a request can be set up to pull the data from this URL.

ACROBOTIC goes into far more detail in their video, and it’s a great resource if you’re looking to try out working with JSON files or to learn how to pull data from Reddit.

Find more projects using e-paper displays for you to recreate in our handy guide.

The post Pulling shower thoughts from Reddit for a Raspberry Pi e-paper display appeared first on Raspberry Pi.

Raspberry Pi Sense HAT impact recorder for your car

Par Alex Bate

Let the accelerometer and gyroscope of your Raspberry Pi Sense HAT measure and record impact sustained in a car collision.

Raspberry Pi Sense HAT

The Raspberry Pi Sense HAT was originally designed for the European Astro Pi Challenge, inviting schoolchildren to code their own experiments for two Raspberry Pi units currently orbiting the Earth upon the International Space Station.

The Sense HAT is kitted out with an 8×8 RGB LED matrix and a five-button joystick, and it houses an array of useful sensors, including an accelerometer and gyroscope.

And it’s these two sensors that Instructables user Ashu_d has used for their Impact Recorder for Vehicles.

Impact Recorder for Vehicles

“Impact Recorder is designed to record impact sustained to a vehicle while driving or stationary,” Ashu_d explains. Alongside the Raspberry Pi and Sense HAT, the build also uses a Raspberry Pi Camera Module to record footage, saving video and/or picture files to the SD card for you to examine after a collision. “The impacts are stored in the database in the form of readings as well as video/picture.”

By following Ashu_d’s Instructables tutorial, you’re essentially building yourself a black box for your car, recording impact data as the Sense HAT records outside the standard parameters of your daily commute.

“Upon impact, remote users can be verified in real time,” they continue, “and remote users can then watch the saved video or take remote access to the Pi Camera Module and watch events accordingly.”

Ashu_d goes into great detail on how to use Node-RED and MQTT to complete the project, how you can view video in real time using VLC, and how each element works to create the final build over at Instructables.

The post Raspberry Pi Sense HAT impact recorder for your car appeared first on Raspberry Pi.

Playing Snake on a Raspberry Pi word clock

Par Alex Bate

I have a soft spot for Raspberry Pi word clocks. True, they may not be as helpful as your standard clock face if you need to tell the time super quickly, but at least they’re easier to read than this binary clock built by engineerish.

“But Alex,” I hear you cry, “word clocks are so done. We’re over them. They’re so 2018. What’s so special about a word clock that you feel it to be worthy of a blog post?”

And the answer, dear reader, is Snake, the best gosh darn game to ever grace the screen of a mobile phone, ever — sorry, Candy Crush.

If you’re looking to build a word clock using your Raspberry Pi, here’s a great tutorial from Benedikt Künzel. And, if you’re looking to upgrade said word clock to another level and introduce it to Snake, well, actually, there isn’t a tutorial for that, yet, but there’s a whole conversation going on about it on Reddit, so you should check that out.

There is, however, a tutorial for coding your own game of Snake Slug on the Raspberry Pi Sense HAT here. So give that a whirl!

Until tomorrow, fair reader, adieu.

The post Playing Snake on a Raspberry Pi word clock appeared first on Raspberry Pi.

Rather lovely Raspberry Pi time lapses

Par Alex Bate

Having just sat and watched this gorgeous time lapse of a Finnish lake, we thought it would be nice to finish off the working week with a collection of lovely Raspberry Pi Camera Module time lapses.

Summer over a Finnish lake

Summer time lapse over a Finnish lake.

Time lapse over a Finnish lake from July 2019. Shot with a DIY all-weather HDR time-lapse camera built from ZWO ASI 224MC and Raspberry Pi 3. The camera was built to function as an all-sky camera for recording the night sky year round but since in July the stars were not visible in Finland I decided to test it aimed horizontally over a lake and was positively surprised about the results.

Time-lapse over a Finnish lake from July 2019. Shot with a DIY all-weather HDR time-lapse camera built from ZWO ASI 224MC and Raspberry Pi 3.

Six days of cress growth

Cress Seeds Growing Raspberry Pi Time Lapse Video

Filmed over 6 days using a Raspberry Pi Zero W and Raspberry Pi Camera. Once photo taken every 5 minutes and then played back at 24 fps. I removed the night time photos and then the images were stitched together using the ‘Stop Motion’ app on an iPhone.

Filmed over 6 days using a Raspberry Pi Zero W and Raspberry Pi Camera. Once photo taken every 5 minutes and then played back at 24 fps.

Growing salad

Salad Growth | Timelapse | Raspberry Pi Camera | PiMeetsPlants

Timelapse about salad growth. Period of Picture Making: 03-04 to 02-05-2016 Camera has shot 2087 pictures in a distance of 20 minutes. Camera: Raspberry Pi Camera Module Music: Valesco – Stay With Me: http://soundcloud.com/valesco_official/stay-with-me Valesco on Soundcloud: http://soundcloud.com/valesco_official My Links: Website: https://pimeetsplants.com Twitter: https://twitter.com/PiMeetsPlants Google+: https://plus.google.com/+Pimeetsplants

I think I have a thing for time-lapse videos of plant growth. They’re just so friggin’ cool!

Skyline time lapse

Skyline Timelapse: Day to Night l SainSmart FOV160° Raspberry Pi Camera

More info : https://www.sainsmart.com/products/wide-angle-fov160-5-megapixel-camera-module-for-raspberry-pi FOLLOW US Twitter: https://twitter.com/Sain_Smart Facebook: https://www.facebook.com/SainSmart/ Instagram: https://www.instagram.com/sainsmart/

A time lapse of slime

PHYSARUM MACHINE

Summer Project 2018 – Computational Arts MA, Goldsmiths University London. Time-lapse footage of Physarum Polycephalum captured with Raspberry Pi and IR camera, slit-scan program in Open Frameworks.

Summer Project 2018 – Computational Arts MA, Goldsmiths University London. Time-lapse footage of Physarum Polycephalum captured with Raspberry Pi and IR camera, slit-scan program in Open Frameworks.

Setting up the Raspberry Pi Store, Cambridge

Setting up the Raspberry Pi Shop, Cambridge

Given that we had access to a bunch of Raspberry Pis, we thought that we should use some of them to get some timelapse footage of the shop being set up. Read more about the Raspberry Pi shop on our blog: http://rpf.io/ytstoreblog

We couldn’t help ourselves. When the time came to set up the Raspberry Pi retail store in Cambridge, we just had to install a time-lapse camera in the corner.

Technically…

While this time lapse wasn’t taken with a Raspberry Pi Camera Module, the slider moving the camera was controlled using Raspberry Pi. That counts, right?

The Burren

The Burren is a karst landscape region in north-west Co. Clare in Ireland. It is one of the largest karst regions in Europe. I have been photographing The Burren over the last 5 years, and recently got into time lapse photography. The Burren was an obvious place for me to do this first video.

The Burren is a karst landscape region in north-west Co. Clare in Ireland. It is one of the largest karst regions in Europe. I have been photographing The Burren over the last 5 years, and recently got into time-lapse photography. The Burren was an obvious place for me to do this first video.

Your turn

Want to set up your own Raspberry Pi time-lapse camera? Our handy guide shows you how.

Do you have a time-lapse video you’d like to share with us? Then please post your link in the comments below.

The post Rather lovely Raspberry Pi time lapses appeared first on Raspberry Pi.

Create your own arcade-style continue screen | Wireframe #19

Par Ryan Lambie

Raspberry Pi’s Rik Cross shows you how to create game states, and rules for moving between them.

Ninja Gaiden’s dramatic continue screen. Who would be cruel enough to walk away?

The continue screen, while much less common now, was a staple feature of arcade games, providing an opportunity (for a small fee) to reanimate the game’s hero and to pick up where they left off.

Continue Screens

Games such as Tecmo’s Ninja Gaiden coin-op (known in some regions as Shadow Warriors) added jeopardy to their continue screen, in an effort to convince us to part with our money.

Often, a continue screen is one of many screens that a player may find themselves on; other possibilities being a title screen or an instruction screen. I’ll show you how you can add multiple screens to a game in a structured way, avoiding a tangle of if…else statements and variables.

A simple way of addressing this problem is to create separate update and draw functions for each of these screens, and then switch between these functions as required. Functions are ‘first-class citizens’ of the Python language, which means that they can be stored and manipulated just like any other object, such as numbers, text, and class instances. They can be stored in variables and other data types such as lists and dictionaries, and passed as parameters to (or returned from) other functions.

the continue screen of SNK’s Fantasy

SNK’s Fantasy, released in 1981, was the first arcade game to feature a continue screen.

We can take advantage of the first-class nature of Python functions by storing the functions for the current screen in variables, and then calling them in the main update() and draw() functions. In the following example, notice the difference between storing a function in a variable (by using the function name without parentheses) and calling the function (by including parentheses).

[Ed. comment: We have to use an image here because WordPress doesn’t seem to allow code indentation. We know that’s annoying because you can’t copy and paste the code, so if you know a better solution, please leave us a comment.]

The example code above calls currentupdatefunction() and currentdrawfunction(), which each store a reference to separate update() and draw() functions for the continue screen. These continue screen functions could then also include logic for changing which function is called, by updating the function reference stored in currentupdatefunction and currentdrawfunction.

This way of structuring code can be taken a step further by making use of state machines. In a state machine, a system can be in one of a (finite) number of predefined states, and rules determine the conditions under which a system can transition from one state into another.

Rules define conditions that need to be satisfied in order to move between states.

A state machine (in this case a very simplified version) can be implemented by first creating a core State() class. Each game state has its own update() and draw() methods, and a rules dictionary containing state:rule pairs – references to other state objects linked to functions for testing game conditions. As an example, the continuescreen state has two rules:

  • Transition to the gamescreen state if the SPACE key is pressed;
  • Transition to the titlescreen state if the frame timer reaches 10.

This is pulled together with a StateMachine() class, which keeps track of the current state. The state machine calls the update() and draw() methods for the current state, and checks the rules for transitioning between states. Each rule in the current state’s rules list is executed, with the state machine updating the reference to its current state if the rule function returns True. I’ve also added a frame counter that is incremented by the state machine’s update() function each time it is run. While not a necessary part of the state machine, it does allow the continue screen to count down from 10, and could have a number of other uses, such as for animating sprites.

Something else to point out is the use of lambda functions when adding rules to states. Lambda functions are small, single-expression anonymous functions that return the result of evaluating its expression when called. Lambda functions have been used in this example simply to make the code a little more concise, as there’s no benefit to naming the functions passed to addrule().

State machines have lots of other potential uses, including the modelling of player states. It’s also possible to extend the state machine in this example by adding onenter() and onexit() functions that can be called when transitioning between states.

Here’s Rik’s code, which gets a simple continue screen up and running in Python. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code, visit our Github repository here.

Get your copy of Wireframe issue 19

You can read more features like this one in Wireframe issue 19, 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 19 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 Create your own arcade-style continue screen | Wireframe #19 appeared first on Raspberry Pi.

Build Demolition Man’s verbal morality ticketing machine

Par Alex Bate

In the 1993 action movie Demolition Man, Sylvester Stallone stars as a 1990s cop transported to the near-future. Technology plays a central role in the film, often bemusing the lead character. In a memorable scene, he is repeatedly punished by a ticketing machine for using bad language (a violation of the verbal morality statute).

In the future of Demolition Man, an always-listening government machine detects every banned word and issues a fine in the form of a receipt from a wall-mounted printer. This tutorial shows you how to build your own version using Raspberry Pi, the Google Voice API, and a thermal printer. Not only can it replicate detecting banned words, but it also doubles as a handy voice-to-paper stenographer (if you want a more serious use).

Prepare the hardware

We built a full ‘boxed’ project, but you can keep it simple if you wish. Your Raspberry Pi needs a method for listening, speaking, and printing. The easiest solution is to use USB for all three.

After prototyping using Raspberry Pi 4 and various USB devices, we settled on Raspberry Pi Zero W with a small USB mic and Pimoroni Speaker pHAT to save space. A Pico HAT Hacker allowed the connection of both the printer and Speaker pHAT, as they don’t share GPIO pins. This bit of space-saving means we could install the full assembly inside the 3D-printed case along with the printer.

Connect the printer

To issue our receipts we used a thermal printer, the kind found in supermarket tills. This particular model is surprisingly versatile, handling text and graphics.

It takes standard 2.25-inch (57mm) receipt paper, available in rolls of 15 metres. When printing, it does draw a lot of current, so we advise using a separate power supply. Do not attempt to power it from your Raspberry Pi. You may need to fit a barrel connector and source a 5V/1.5A power supply. The printer uses a UART/TTL serial connection, which neatly fits on to the GPIO. Although the printer’s connection is listed as being 5V, it is in fact 3.3V, so it can be directly connected to the ground, TX, and RX pins (physical pins 6, 8, 10) on the GPIO.

Install and configure Raspbian

Get yourself a copy of Raspbian Buster Lite and burn it to a microSD card using a tool like Etcher. You can use the full version of Buster if you wish. Perform the usual steps of getting a wireless connection and then updating to the latest version using sudo apt update && sudo apt -y upgrade. From a command prompt, run sudo raspi-config and go to ‘Interfacing options’, then ‘Enable serial’. When asked if you would like the login shell to be accessible, respond ‘No’. To the next question, ‘Would you like the serial port hardware to be enabled?’, reply ‘Yes’. Now reboot your Raspberry Pi.

Test the printer

Make sure the printer is up and running. Double-check you’ve connected the header to the GPIO correctly and power up the printer. The LED on the printer should flash every few seconds. Load in the paper and make sure it’s feeding correctly. We can talk to the printer directly, but the Python ‘thermalprinter‘ library makes coding for it so much easier. To install the library:

sudo apt install python3-pip
pip3 install thermalprinter

Create a file called printer.py and enter in the code in the relevant listing. Run the code using:

python3 printer.py

If you got a nice welcoming message, your printer is all set to go.

Test the microphone

Once your microphone is connected to Raspberry Pi, check the settings by running:

alsamixer

This utility configures your various sound devices. Press F4 to enter ‘capture’ mode (microphones), then press F6 and select your device from the list. Make sure the microphone is not muted (M key) and the levels are high, but not in the red zone.

Back at the command line, run this command:

arecord -l

This shows a list of available recording devices, one of which will be your microphone. Make a note of the card number and subdevice number.

To make a test recording, enter:

arecord --device=hw:1,0 --format S16_LE --rate 44100 -c1 test.wav

If your card and subdevice numbers were not ‘0,1’, you’ll need to change the device parameter in the above command.

Say a few words, then use CTRL+C to stop recording. Check the playback with:

aplay test.wav

Choose your STT provider

STT means speech to text and refers to the code that can take an audio recording and return recognised speech as plain text. Many solutions are available and can be used in this project. For the greatest accuracy, we’re going to use Google Voice API. Rather than doing the complex processing locally, a compressed version of the sound file is uploaded to Google Cloud and the text returned. However, this does mean Google gets a copy of everything ‘heard’ by the project. If this isn’t for you, take a look at Jasper, an open-source alternative that supports local processing.

Create your Google project

To use the Google Cloud API, you’ll need a Google account. Log in to the API Console at console.developers.google.com. We need to create a project here. Next to ‘Google APIs’, click the drop-down menu, then ‘New Project’. Give it a name. You’ll be prompted to enable APIs for the project. Click the link, then search for ‘speech’. Click on ‘Cloud Speech-to-Text API’, then ‘Enable’. At this point you may be prompted for billing information. Don’t worry, you can have up to 60 minutes of audio transcribed for free each month.

Get your credentials

Once the Speech API is enabled, the screen will refresh and you’ll be prompted to create credentials. This is the info our code needs to be granted access to the speech-to-text API. Click on ‘Create Credentials’ and on the next screen select ‘Cloud Speech-to-text API’. You’re asked if you’re planning to use the Compute Engine; select ‘no’. Now create a ‘service account’. Give it a different name from the one used earlier, change the role to ‘Project Owner’, leave the type of file as ‘JSON’, and click ‘Continue’. A file will be downloaded to your computer; transfer this to your Raspberry Pi.

Test Google recognition

When you’re happy with the recording levels, record a short piece of speech and save it as test.wav. We’ll send this to Google and check our access to the API is working. Install the Google Speech-To-Text Python library:

sudo apt install python3-pyaudio
pip3 install google-cloud-speech

Now set an environment variable that the libraries will use to locate your credentials JSON:

export GOOGLE_APPLICATION_CREDENTIALS="/home/pi/[FILE_NAME].json"

(Don’t forget to replace [FILE_NAME] with the actual name of the JSON file).

Using a text editor, create a file called speech_to_text.py and enter the code from the relevant listing. Then run it:

python3 speech_to_text.py

If everything is working correctly, you’ll get a text transcript back within a few seconds.

Live transcription

Amazingly, Google’s speech-to-text service can also support streaming recognition, so rather than capture-then-process, the audio can be sent as a stream, and a HTTP stream of the recognised text comes back. When there is a pause in the speech, the results are finalised, so then we can send the results to the printer. If all the code you’ve entered so far is running correctly, all you need to do is download the stenographer.py script and start it using:

python3 stenographer.py

You are limited on how long you can record for, but this could be coupled with a ‘push to talk’ button so you can make notes using only your voice!

Banned word game

Back to Demolition Man. We need to make an alarm sound, so install a speaker (a passive one that connects to the 3.5mm jack is ideal; we used a Pimoroni Speaker pHAT). Download the banned.py code and edit it in your favourite text editor. At the top is a list of words. You can change this to anything you like (but don’t offend anyone!). In our list, the system is listening for a few mild naughty words. In the event anyone mentions one, a buzzer will sound and a fine will be printed.

Make up your list and start the game by running:

python3 banned.py

Now try one of your banned words.

Package it up

Whatever you decide to use this project for, why not finish it up with a 3D-printed case so you package up the printer and Raspberry Pi with the recording and playback devices and create a portable unit? Ideal for pranking friends or taking notes on the move!

See if you can invent any other games using voice recognition, or investigate the graphics capability of the printer. Add a Raspberry Pi Camera Module for retro black and white photos. Combine it with facial recognition to print out an ID badge just using someone’s face. Over to you.

The MagPi magazine issue 84

This project was created by PJ Evans for The MagPi magazine issue 84, available now online, from your local newsagents, or as a free download from The MagPi magazine website.

The post Build Demolition Man’s verbal morality ticketing machine appeared first on Raspberry Pi.

Raspberry Pi internet kill switch

Par Alex Bate

Control the internet in your home with this handy Raspberry Pi Zero W internet kill switch.

Internet Kill Switch!

It’s every teenager’s worst nightmare… no WIFI! I built a standalone wireless Internet Kill Switch that lets me turn the Internet off whenever I want. A Raspberry Pi Zero W monitors the switch and sends an alert via SSH over WIFI to my firewall where another script watches for the alert and turns the external interface off or on.

Internet in my home wasn’t really a thing until I was in my late teens, and even then, there wasn’t that much online fun to be had. Not like there is now, with social media and online gaming and the YouTubes.

If I’d had access to the internet of today in my teens, I’m pretty sure I’d have never been off the thing. And that’s where a button like this would have been a godsend for my mother.

Shared by Nick Donaldson on his YouTube account, the Internet Kill Switch is a Raspberry Pi Zero W–powered emergency button that turns off all internet access in the house — perfect for keeping online activities to a reasonable level. Nick explains:

It’s every teenager’s worst nightmare… no WiFi! I built a standalone wireless Internet Kill Switch that lets me turn the internet off whenever I want. A Raspberry Pi Zero W monitors the switch and sends an alert via SSH over WiFi to my firewall, where another script watches for the alert and turns the external interface off or on. I have challenged the boys to hack it…

The Raspberry Pi Zero W sits snug within the button casing and is powered by a battery. And so that the battery can be continuously recharged, the device sits on a wireless charging pad. Hence, the button is juiced up and ready to go at any time.

I can pick it up, walk around at any time, threaten the teenagers, and shut down the internet whenever I want, hahaha!

While internet service providers are starting to roll out smartphone apps that offer similar functionality, we like the physicality of this button.

Great job, Nick! Please don’t turn off our internet.

The post Raspberry Pi internet kill switch appeared first on Raspberry Pi.

Take a virtual reality tour of the Raspberry Pi Store

Par Alex Bate

Some months back, we received an email from Rob Chinery, explaining that he’d created a virtual reality (VR) tour of the Raspberry Pi Store, Cambridge.

When I heard about the new Raspberry Pi store in Cambridge, I was immediately impressed by the design and aesthetic of the store. I thought it would be a great project to add to my portfolio, so I put together a quick virtual experience based around the store.

Here’s a video for those without VR headsets:

Raspberry Pi Store VR Tour With Narration

A narrated VR tour of the Raspberry Pi Store in Cambridge, U.K.

Cool, right?

Based in New York, Rob hadn’t visited the store at the time and created the walk-through using images and video content that he’d found online.

I had to rely on a few press images from the opening to make the model (which did make things a bit difficult). One of the reasons I decided to build the app is to allow us Pi fans on other continents to virtually experience the store.

Since our initial communications in April, Rob has now managed to visit the store in the flesh, as he explained on Reddit.

Rob has built the tour specifically for mobile VR platforms, and it is available for free on Oculus Go and Gear VR. You can also view it via Testflight on Android and iOS using a cardboard viewer. You can try the Raspberry Pi Store VR tour here. And, if you’re in need of a mobile VR experience for your architectural projects, Rob’s your guy!

In the words of Liz, colour us impressed.

The post Take a virtual reality tour of the Raspberry Pi Store appeared first on Raspberry Pi.

Raspberry Pi Zero white noise night light

Par Alex Bate

Many members of the Raspberry Pi team have small children. As such, many members of the Raspberry Pi team are constantly tired and walking around like zombies — loving, productive zombies humming Baby Shark while scrubbing food stains off their clothing.

Whenever a Raspberry Pi project appears on social media that aids parents do the simple things in life — such as getting sleep or finding time to eat, breathe, shower, etc. — it’s an instant hit around the office.

White noise night light for unrelenting children

This is why, while setting up my desk this morning, I heard an “Oooo, white noise nightlight!” cheer from behind me and turned to find Liz checking out this new project from Instructables maker Cary Ciavolella.

This is a project I made for my 1-year-old for Christmas. Honestly, though, it was a sanity present for me and my wife. It’s a white noise machine that can play multiple different sounds selected through a web interface, and also incorporates lights that change color based on the time (red lights mean be in bed, yellow mean you can play in your room, and green means it’s ok to come out). Since my son is too young to tell time, a color-based night light seemed like a really good idea.

As Cary has kindly provided all the code for the project, it’s a fairly easy build to replicate at home and looks like it’ll do the trick.

The device uses a Raspberry Pi Zero W, Blinkt, and Speaker pHAT from Pimoroni, and a handful of wires. Building it requires some basic soldering skills. If you’re unsure about your soldering skills, our handy video guide is all you need to get started.

How to solder your Raspberry Pi header pins

Learn the basics of how to solder components together, and the safety precautions you need to take.

The white noise files are selectable via a flask webserver hosted on the Raspberry Pi that parents can control via their smart device. Cary’s write-up for the project is so wonderfully detailed that any parent looking to build their own device can easily replace the white noise files with any MP3s of their choice.

Here’s the Instructables tutorial to help you get started on your own.

Remix your own

What’s so wonderful about this project is that it’s a great example of a build that is easily hackable to fit your own requirements. If you don’t have a child, it’s still a great notification device for your day-to-day routine, or a nice tool to remind a relative to take medication based on a colour system. There’s so much you can do using Cary’s build as the bare bones, which is why we think it’s awesome, and you should too.

The post Raspberry Pi Zero white noise night light appeared first on Raspberry Pi.

IT’S SO HOT OVER HERE. WE’RE MELTING. SEND HELP.

Par Alex Bate

[Today’s temperatures are set to reach a whopping 38ºC/101ºF degrees in the UK, and none of us know what to do with ourselves. This doesn’t happen here and we have nothing prepared: we live in a society devoid of air conditioning, and we’re are unable to comprehend weather conditions more friendly than a slight chill and drizzle.

I can’t handle it. I have desk fan, but it’s in a cupboard somewhere, covered in dust and sadness. My local corner shop is already out of ice pops and ice cube trays. And anyway, I believe the tarmac on the road outside my house has melted and will suck down anything that dares step or drive on it.

I think I’m melting too. I feel sloshy, and, while I’m not 100% sure this is scientifically possible, I believe I may be partly barbequed. If someone presented me at a restaurant, I would probably be described as medium rare.

So yes, it’s hot. Very hot. It only makes sense that we share a Raspberry Pi project that fits with this theme: here’s an article from the latest issue of The MagPi magazine, out today, that shows you how Ishmael Vargas built his own smart fan for his home in hot and humid Chicago.

It’s a very clever idea, and one we wish we’d thought up ourselves before today’s sudden heatwave/opening of the Hell Mouth.

Enjoy — Alex]

When you need to keep your home cool during the summer months, a smart window fan could be just the thing.

Summer days, and nights, can be uncomfortably hot and humid in the Chicago area. As the sun goes down, the outside temperature drops, but homes may remain hot. This is where a window fan comes in useful, blowing cooler air into the house. Last summer, Ishmael Vargas was using a small window fan upstairs and, after turning it on in the afternoon, he found he had to get up in the middle of the night to turn it off. “That is when I thought there must be a better way to control this fan,” he recalls, “and I started putting this project together.”

Viewable via VNC on a smartphone, the program window features temperature data and control buttons.

As he was already using a DHT22 temperature and humidity sensor for another project, he opted to use that, connected to a Raspberry Pi Zero running a Python program, to monitor the room temperature. This is then compared with the external temperature; if the latter is cooler, the window fan is turned on via a smart WiFi power plug (TP-Link HS100) — a much simpler method than wiring the fan up to a relay.

Weather report

To keep things simple, Ishmael opted to source the outdoor temperature from Weather.com (The Weather Channel) using the pywapi Python library, rather than wiring up an external sensor. “The temperature provided by Weather.com as compared to the temperature in my car could differ by one or two degrees. This is close enough for this project,” he explains. “In other parts of the world or rural areas where they do not have as many weather stations, an outdoor sensor might be required.”

A smart WiFi socket is used to turn the window fan on and off.

One issue he discovered was that in the early morning, the fan could end up blowing warm air into the house. “Depending on the size of the fan, the size of the room, and the house materials, the inside temperature might never be as cool as outside,” he says. “For example, if the temperature outside is 65 °F (18°C), the temperature inside might only drop to 67 °F (19.5°C) through the night. As the temperature outside starts to climb, you want to keep the fan off.” This resulted in him adding an ‘inhibit’ mode to turn the fan off at 6am.

Remote control

Rather than having the fan program run automatically on bootup, Ishmael opted to start and control it manually via an Android smartphone. The latter runs the VNC Viewer app, enabling remote access to Raspberry Pi’s desktop, on which there is a shortcut to start the fan application; this then displays a Pygame window with temperature information and control buttons.

The DHT22 sensor is connected to power, ground, and GPIO 4 pins on a Raspberry Pi Zero — a 10kΩ resistor is recommended.

“The fan application has two buttons to change the [desired temperature] set-point up or down,” reveals Ishmael. “Also, the button on the upper right is to close the application and return to the desktop.” His aim is to have more than one project running on his Raspberry Pi, and have a desktop shortcut for each application.

While the original project used a single fan, he has since modified it to add another. “I have been reading that two fans are required for best performance,” he says. “One to blow in and another to blow out.”

This certainly is a cool project, in more than one way. If you’d like to have a go at building a similar system, you can read Ishmael’s Hackster guide and check out his GitHub repo for the code.

You should read The MagPi magazine

The latest edition of The MagPi magazine is out today, packed full of Raspberry Pi goodness. If you’re new to The MagPi magazine, welcome! As with all publications produced by Raspberry Pi Press, today’s new issue is available as a free download on The MagPi website, as well as in physical form from your local newsagent, the Raspberry Pi Store in Cambridge, or the Raspberry Pi Press online store.

Subscribers to The MagPi magazine get discounts and free stuff, and anyone purchasing any of our publications with actual currency will help fund the production of the magazine as well as the charitable work of the Raspberry Pi Foundation.

The post IT’S SO HOT OVER HERE. WE’RE MELTING. SEND HELP. appeared first on Raspberry Pi.

Historical high-resolution graphics on Raspberry Pi

Par Alex Bate

Raspberry Pi Trading engineer James Hughes recently pointed out a project to us that he’d found on the Raspberry Pi forum. Using a Raspberry Pi, forum member Rene Richarz has written a Tektronix 4010, 4013, 4014, 4015, and ARDS terminal emulator. The project sounded cool, but Helen and I didn’t 100% get it, so we asked James to write an introduction for us. You can find that below, followed by the project itself. James’s intro is amazing, because, despite this heat messing with my concentration, I understand the project now! That James – what a treasure. And here he is:

Those of a certain age will remember the vector graphics display of arcade games like Battlezone and Asteroids, and the subsequent colour displays of Star Wars and Tempest. Even earlier than these games came the less sophisticated Tektronic storage tube terminals used by the pioneers of computer graphics, combined with the PDP-11s and Vax’s that were the staple of computer graphics labs of the era.

Unlike the raster displays that everyone uses now, these terminals used a steerable electron beam (the ‘write gun’) to draw lines directly on the phosphor of the monitor, which were kept illuminated by a secondary ‘flood gun’. These devices had very high resolution, up to 1024×1024 pixels, but the big problem was that you could not erase just a bit of the display — you had to erase the whole image!

Rene Richarz’s project emulates these fascinating old displays, even down to the speed of drawing: because the display needed to be charged, the electron gun could only travel at a limited speed of 1500–4000 vector inches/second!

Once memory prices started dropping, the cost of raster displays also dropped significantly, meaning these early computer graphics vector displays were consigned to the annals of history. But their memory lives on, not only in the project we see here but in many of the algorithms and techniques developed in those early years that are still used today.

PiDP-11 with tek4010 Tektronix 4014 emulator

This video shows the blinking PiDP-11 (https://obsolescence.wixsite.com/obsolescence) running the historical 2.11 BSD Unix (https://github.com/rricharz/pidp11-2.11bsd) with the Tektronix 4014 emulator tek4010 (https://github.com/rricharz/Tek4010). Late 1970s Blinkenlight action and storage tube display action.

As Rene explains on the GitHub repo, his project “makes an effort to emulate the storage tube display of the Tektronix 4010, including the bright drawing spot. It can be used to log into a historical Unix system such as 2.11 BSD on the PiDP-11 or a real historical system. It can also be used to display historical plot data.”

You can see more information on the project, and join in the community discussion, on our forum, and find all the relevant code and instructions for creating your own on GitHub. And if you’d like a primer on how the bistable storage CRTs that Rene is emulating work, you could do worse than take a look at how Tektronix explained it to their customers in the July 1972 issue of Tekscope magazine.

We’ll close with this underappreciated reflection on the virtues of vector displays:

Yes raster is faster, but raster is vaster, and vector just seems more correcter.
Reproduced from old.carto.net; attributed to Dana Tomlin, 1990

The post Historical high-resolution graphics on Raspberry Pi appeared first on Raspberry Pi.

Bringing a book to life with Raspberry Pi | Hello World #9

Par Alex Bate

Sian Wheatcroft created an interactive story display to enable children to explore her picture book This Bear, That Bear. She explains the project, and her current work in teaching, in the newest issue of Hello World magazine, available now.

The task of promoting my first children’s picture book, This Bear, That Bear, was a daunting one. At the time, I wasn’t a teacher and the thought of standing in front of assembly halls and classrooms sounded terrifying. As well as reading the book to the children, I wanted to make my events interactive using physical computing, showing a creative side to coding and enabling a story to come to life in a different way than what the children would typically see, i.e. animated retellings.

The plan

Coming from a tech-loving family, I naturally gravitated towards the Raspberry Pi, and found out about Bare Conductive and their PiCap. I first envisaged using their conductive paint on the canvas, enabling users to touch the paint to interact with the piece. It would be some sort of scene from the book, bringing some of the characters to life. I soon scrapped that idea, as I discovered that simply using copper tape on the back of the canvas was conductive enough, which also allowed me to add colour to the piece.

I enlisted the help of my two sons (two and five at the time) — they gladly supplied their voices to some of the bears and, my personal favourite on the canvas, the ghost. The final design features characters from the book — when children touch certain areas of the canvas, they hear the voices of the characters.

The back of the canvas, covered in copper tape

Getting the project up and running went pretty smoothly. I do regret making the piece so large, though, as it proved difficult to transport across the country, especially on the busy London Underground!

Interactivity and props

The project added a whole other layer to the events I was taking part in. In schools, I would read the book and have props for the children to wear, allowing them to act out the book as I read aloud. The canvas then added further interaction, and it surprised me how excited the children were about it. They were also really curious and wanted to know how it worked. I enjoyed showing them the back of the canvas with all its copper tape and crocodile clips. They were amazed by the fact it was all run on the Raspberry Pi — such a tiny computer!

The front of the interactive canvas

Fast-forward a few years, and I now find myself in the classroom full-time as a newly qualified teacher. The canvas has recently moved out of the classroom cupboard into my newly developed makerspace, in the hope of a future project being born.

I teach in Year 3, so coding in Python or using the command line on Raspbian may be a little beyond my students. However, I have a keen interest in project-based learning and am hoping to incorporate a host of cross-curricular activities with my students involving the canvas.

I hope to instil a love for digital making in my students and, in turn, show senior leaders what can be done with such equipment and projects.

A literacy project

This work really lends itself to a literacy project that other educators could try. Perhaps you’re reading a picture book or a more text-based piece: why not get the students to design the canvas using characters from the story? The project would also work equally well with foundation subjects like History or Science. Children could gather information onto the canvas, explaining how something works or how something happened. The age of the children would influence the level of involvement they had in the rest of the project’s creation. The back end could be pre-made — older children could help with the copper tape and wiring, while younger children could stop at the design process.

Part of the project is getting the children to create sounds to go with their design, enabling deeper thinking about a story or topic.

It’s about a collaborative process with the teacher and students, followed by the sharing of their creation with the broader school community.

Get Hello World magazine issue 9 for free

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

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

Head to helloworld.raspberrypi.org to sign up today!

The post Bringing a book to life with Raspberry Pi | Hello World #9 appeared first on Raspberry Pi.

Saving biologists’ time with Raspberry Pi

Par Alex Bate

In an effort to save themselves and fellow biologists hours of time each week, Team IoHeat are currently prototyping a device that allows solutions to be heated while they are still in cold storage.

The IoHeat team didn’t provide any photos with their project writeup, so here’s a picture of a bored biologist that I found online

Saving time in the lab

As they explain in their prototype write-up:

As scientists working with living organisms (from single cells to tissue samples), we are often required to return to work outside of normal hours to maintain our specimens. In many cases, the compounds and solutions we are using in our line of work are stored at 4°C and need to reach 37°C before they can be used. So far, in order to do this we need to return to our workplace early, incubate our solutions at 37°C for 1–2h, depending on the required volume, and then use them in processes that often take a few minutes. It is clear that there is a lot of room here to improve our efficiency.

Controlling temperatures with Raspberry Pi

These hours wasted on waiting for solutions to heat up could be better spent elsewhere, so the team is building a Raspberry Pi–powered device that will allow them to control the heating process remotely.

We are aiming to built a small incubator that we can store in a cold room/fridge, and that can be activated remotely to warm up to a defined temperature. This incubator will enable us to safely store our reagents at low temperature and warm them up remotely before we need to use them, saving an estimate of 12h per week per user.

This is a great project idea, and they’ve already prototyped it using a Raspberry Pi, heating element, and fan. Temperature and humidity sensors connected to the Raspberry Pi monitor conditions inside the incubator, and the prototype can be controlled via Telegram.

Find out more about the project on Hackster.

We’ve got more than one biologist on the Raspberry Pi staff, so we have a personal appreciation for the effort behind this project, and we look forward to seeing how IoHeat progresses in the future.

The post Saving biologists’ time with Raspberry Pi appeared first on Raspberry Pi.

Monitor air quality with a Raspberry Pi

Par Andrew Gregory

Add a sensor and some Python 3 to your Raspberry Pi to keep tabs on your local air pollution, in the project taken from Hackspace magazine issue 21.

Air is the very stuff we breathe. It’s about 78% nitrogen, 21% oxygen, and 1% argon, and then there’s the assorted ‘other’ bits and pieces – many of which have been spewed out by humans and our related machinery. Carbon dioxide is obviously an important polluter for climate change, but there are other bits we should be concerned about for our health, including particulate matter. This is just really small bits of stuff, like soot and smog. They’re grouped together based on their size – the most important, from a health perspective, are those that are smaller than 2.5 microns in width (known as PM2.5), and PM10, which are between 10 and 2.5 microns in width. This pollution is linked with respiratory illness, heart disease, and lung cancer.

Obviously, this is something that’s important to know about, but it’s something that – here in the UK – we have relatively little data on. While there are official sensors in most major towns and cities, the effects can be very localised around busy roads and trapped in valleys. How does the particular make-up of your area affect your air quality? We set out to monitor our environment to see how concerned we should be about our local air.

Getting started

We picked the SDS011 sensor for our project (see ‘Picking a sensor’ below for details on why). This sends output via a binary data format on a serial port. You can read this serial connection directly if you’re using a controller with a UART, but the sensors also usually come with a USB-to-serial connector, allowing you to plug it into any modern computer and read the data.

The USB-to-serial connector makes it easy to connect the sensor to a computer

The very simplest way of using this is to connect it to a computer. You can read the sensor values with software such as DustViewerSharp. If you’re just interested in reading data occasionally, this is a perfectly fine way of using the sensor, but we want a continuous monitoring station – and we didn’t want to leave our laptop in one place, running all the time. When it comes to small, low-power boards with USB ports, there’s one that always springs to mind – the Raspberry Pi.

First, you’ll need a Raspberry Pi (any version) that’s set up with the latest version of Raspbian, connected to your local network, and ideally with SSH enabled. If you’re unsure how to do this, there’s guidance on the Raspberry Pi website.

The wiring for this project is just about the simplest we’ll ever do: connect the SDS011 to the Raspberry Pi with the serial adapter, then plug the Raspberry Pi into a power source.

Before getting started on the code, we also need to set up a data repository. You can store your data wherever you like – on the SD card, or upload it to some cloud service. We’ve opted to upload it to Adafruit IO, an online service for storing data and making dashboards. You’ll need a free account, which you can sign up for on the Adafruit IO website – you’ll need to know your Adafruit username and Adafruit IO key in order to run the code below. If you’d rather use a different service, you’ll need to adjust the code to push your data there.

We’ll use Python 3 for our code, and we need two modules – one to read the data from the SDS011 and one to push it to Adafruit IO. You can install this by entering the following commands in a terminal:

pip3 install pyserial adafruit-io

You’ll now need to open a text editor and enter the following code:

This does a few things. First, it reads ten bytes of data over the serial port – exactly ten because that’s the format that the SDS011 sends data in – and sticks these data points together to form a list of bytes that we call data.

We’re interested in bytes 2 and 3 for PM2.5 and 4 and 5 for PM10. We convert these from bytes to integer numbers with the slightly confusing line:

pmtwofive = int.from_bytes(b’’.join(data[2:4]), byteorder=’little’) / 10

from_byte command takes a string of bytes and converts them into an integer. However, we don’t have a string of bytes, we have a list of two bytes, so we first need to convert this into a string. The b’’ creates an empty string of bytes. We then use the join method of this which takes a list and joins it together using this empty string as a separator. As the empty string contains nothing, this returns a byte string that just contains our two numbers. The byte_order flag is used to denote which way around the command should read the string. We divide the result by ten, because the SDS011 returns data in units of tens of grams per metre cubed and we want the result in that format aio.send is used to push data to Adafruit IO. The first command is the feed value you want the data to go to. We used kingswoodtwofive and kingswoodten, as the sensor is based in Kingswood. You might want to choose a more geographically relevant name. You can now run your sensor with:

python3 airquality.py

…assuming you called the Python file airquality.py
and it’s saved in the same directory the terminal’s in.

At this point, everything should work and you can set about running your sensor, but as one final point, let’s set it up to start automatically when you turn the Raspberry Pi on. Enter the command:

crontab -e

…and add this line to the file:

@reboot python3 /home/pi/airquality.py

With the code and electronic setup working, your sensor will need somewhere to live. If you want it outside, it’ll need a waterproof case (but include some way for air to get in). We used a Tupperware box with a hole cut in the bottom mounted on the wall, with a USB cable carrying power out via a window. How you do it, though, is up to you.

Now let’s democratise air quality data so we can make better decisions about the places we live.

Picking a sensor

There are a variety of particulate sensors on the market. We picked the SDS011 for a couple of reasons. Firstly, it’s cheap enough for many makers to be able to buy and build with. Secondly, it’s been reasonably well studied for accuracy. Both the hackAIR and InfluencAir projects have compared the readings from these sensors with more expensive, better-tested sensors, and the results have come back favourably. You can see more details at hsmag.cc/DiYPfg and hsmag.cc/Luhisr.

The one caveat is that the results are unreliable when the humidity is at the extremes (either very high or very low). The SDS011 is only rated to work up to 70% humidity. If you’re collecting data for a study, then you should discard any readings when the humidity is above this. HackAIR has a formula for attempting to correct for this, but it’s not reliable enough to neutralise the effect completely. See their website for more details: hsmag.cc/DhKaWZ.

Safe levels

Once you’re monitoring your PM2.5 data, what should you look out for? The World Health Organisation air quality guideline stipulates that PM2.5 not exceed 10 µg/m3 annual mean, or 25 µg/m324-hour mean; and that PM10 not exceed 20 µg/m3 annual mean, or 50 µg/m3 24-hour mean. However, even these might not be safe. In 2013, a large survey published in The Lancet “found a 7% increase in mortality with each 5 micrograms per cubic metre increase in particulate matter with a diameter of 2.5 micrometres (PM2.5).”

Where to locate your sensor

Standard advice for locating your sensor is that it should be outside and four metres above ground level. That’s good advice for general environmental monitoring; however, we’re not necessarily interested in general environmental monitoring – we’re interested in knowing what we’re breathing in.

Locating your monitor near your workbench will give you an idea of what you’re actually inhaling – useless for any environmental study, but useful if you spend a lot of time in there. We found, for example, that the glue gun produced huge amounts of PM2.5, and we’ll be far more careful with ventilation when using this tool in the future.

Adafruit IO

You can use any data platform you like. We chose Adafruit IO because it’s easy to use, lets you share visualisations (in the form of dashboards) with others, and connects with IFTTT to perform actions based on values (ours tweets when the air pollution is above legal limits).

One thing to be aware of is that Adafruit IO only holds data for 30 days (on the free tier at least). If you want historical data, you’ll need to sign up for the Plus option (which stores data for 60 days), or use an alternative storage method. You can use multiple data stores if you like.

Checking accuracy

Now you’ve got your monitoring station up and running, how do you know that it’s running properly? Perhaps there’s an issue with the sensor, or perhaps there’s a problem with the code. The easiest method of calibration is to test it against an accurate sensor, and most cities here in the UK have monitoring stations as part of Defra’s Automatic Urban and Rural Monitoring Network. You can find your local station here. Many other countries have equivalent public networks. Unless there is no other option, we would caution against using crowdsourced data for calibration, as these sensors aren’t themselves calibrated.

With a USB battery pack, you can head to your local monitoring point and see if your monitor is getting similar results to the monitoring network.

HackSpace magazine #21 is out now

You can read the rest of this feature in HackSpace magazine issue 21, out today in Tesco, WHSmith, and all good independent UK newsagents.

Or you can buy HackSpace mag directly from us — worldwide delivery is available. And if you’d like to own a handy digital version of the magazine, you can also download a free PDF.

The post Monitor air quality with a Raspberry Pi appeared first on Raspberry Pi.

Recreate 3D Monster Maze’s 8-bit labyrinth | Wireframe issue 18

Par Ryan Lambie

You too can recreate the techniques behind a pioneering 3D maze game in Python. Mark Vanstone explains how.

3D Monster Maze, released in 1982 by J.K. Greye software, written by Malcolm Evans.

3D Monster Maze

While 3D games have become more and more realistic, some may forget that 3D games on home computers started in the mists of time on machines like the Sinclair ZX81. One such pioneering game took pride of place in my collection of tapes, took many minutes to load, and required the 16K RAM pack expansion. That game was 3D Monster Maze — perhaps the most popular game released for the ZX81.

The game was released in 1982 by J.K. Greye Software, and written by Malcolm Evans. Although the graphics were incredibly low resolution by today’s standards, it became an instant hit. The idea of the game was to navigate around a randomly generated maze in search of the exit.

The problem was that a Tyrannosaurus rex also inhabited the maze, and would chase you down and have you for dinner if you didn’t escape quickly enough. The maze itself was made of straight corridors on a 16×18 grid, which the player would move around from one block to the next. The shape of the blocks were displayed by using the low-resolution pixels included in the ZX81’s character set, with 2×2 pixels per character on the screen.

The original ZX81 game drew its maze from chunky 2×2 pixel blocks.

Draw imaginary lines

There’s an interesting trick to recreating the original game’s 3D corridor display which, although quite limited, works well for a simplistic rendering of a maze. To do this, we need to draw imaginary lines diagonally from corner to corner in a square viewport: these are our vanishing point perspective guides. Then each corridor block in our view is half the width and half the height of the block nearer to us.

If we draw this out with lines showing the block positions, we get a view that looks like we’re looking down a long corridor with branches leading off left and right. In our Pygame Zero version of the maze, we’re going to use this wireframe as the basis for drawing our block elements. We’ll create graphics for blocks that are near the player, one block away, two, three, and four blocks away. We’ll need to view the blocks from the left-hand side, the right-hand side, and the centre.

The maze display is made by drawing diagonal lines to a central vanishing point.

Once we’ve created our block graphics, we’ll need to make some data to represent the layout of the maze. In this example, the maze is built from a 10×10 list of zeros and ones. We’ll set a starting position for the player and the direction they’re facing (0–3), then we’re all set to render a view of the maze from our player’s perspective.

The display is created from furthest away to nearest, so we look four blocks away from the player (in the direction they’re looking) and draw a block if there’s one indicated by the maze data to the left; we do the same on the right, and finally in the middle. Then we move towards the player by a block and repeat the process (with larger graphics) until we get to the block the player is on.

Each visible block is drawn from the back forward to make the player’s view of the corridors.

That’s all there is to it. To move backwards and forwards, just change the position in the grid the player’s standing on and redraw the display. To turn, change the direction the player’s looking and redraw. This technique’s obviously a little limited, and will only work with corridors viewed at 90-degree angles, but it launched a whole genre of games on home computers. It really was a big deal for many twelve-year-olds — as I was at the time — and laid the path for the vibrant, fast-moving 3D games we enjoy today.

Here’s Mark’s code, which recreates 3D Monster Maze’s network of corridors in Python. To get it running on your system, you’ll need to install Pygame Zero. And to download the full code, visit our Github repository here.

Get your copy of Wireframe issue 18

You can read more features like this one in Wireframe issue 18, 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 18 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 Recreate 3D Monster Maze’s 8-bit labyrinth | Wireframe issue 18 appeared first on Raspberry Pi.

Good Buoy: the Raspberry Pi Smart Buoy

Par Alex Bate

As their new YouTube video shows, the team at T3ch Flicks have been hard at work, designing and prototyping a smart buoy for marine conservation research.

Smart-Buoy Series [Summary]

We all love the seaside, right? Whether that’s the English seaside with ice creams and muddy piers or the Caribbean, with white sand beaches fringed by palm trees, people flock to the coast for a bit of rest and relaxation, to enjoy water sports or to make their livelihood.

What does a smart buoy do?

“The sensors onboard the smart buoy enable it to measure wave height, wave period, wave power, water temperature, air temperature, air pressure, voltage, current usage and GPS location,” explain T3ch Flicks on their project tutorial page. “All the data the buoy collects is sent via radio to a base station, which is a Raspberry Pi. We made a dashboard to display them using Vue JS.”

But why build a smart buoy to begin with? “The coast is a dynamic area at the mercy of waves. Rising sea levels nibble at beaches and powerful extreme events like hurricanes completely decimate them,” they go on to explain. “To understand how to save them, we need to understand the forces driving their change.”

The 3D-printed casing of the smaert buoy with tech inside

It’s a pretty big ask of a 3D-printed dome but, with the aid of an on-board Raspberry Pi, Arduino and multiple sensors, their project was a resounding success. So much so that the Grenadian government gave the team approval to set the buoy free along their coast, and even made suggestions of how the project could be improved to aid them in their own research – pretty cool, right?

The smart buoy out at sea along the Grenada coast

The project uses a lot of tech. A lot. So, instead of listing it here, why not head over to the hackster.io project page, where you’ll find all the ingredients you need to build your own smart buoy.

Good luck to the T3ch Flicks team. We look forward to seeing how the project develops.

The post Good Buoy: the Raspberry Pi Smart Buoy appeared first on Raspberry Pi.

Raspberry Pi mineral oil tank with added pizzazz

Par Alex Bate

This isn’t the first mineral oil bath we’ve seen for the Raspberry Pi, but it’s definitely the first we’ve seen with added fish tank decorations.

Using the see-through casing of an old Apple PowerMac G4, Reddit user u/mjh2901 decided to build a mineral oil tank for their Raspberry Pi, and it looks fabulous. Renamed Apple Pi, this use of mineral oil is a technique used by some to manage the heat produced by tech. Oil is able to transfer heat up to five times more efficiently than air, with some mineral oil projects using a separate radiator to dissipate the heat back into the air.

So, how did they do it?

“Started with a PowerMac G4 case I previously used as a fish tank, then a candy dish. I had cut a piece of acrylic and glued it into the bottom.”

They then placed a Raspberry Pi 3 attached to a 2-line 16 character LCD into the tank, along with various decorations, and began to fill with store-bought mineral oil. Once full, the project was complete, the Raspberry Pi forever submerged.

You can find more photos here. But, one question still remains…

…who would use an old fish tank as a candy bowl?! 🤢

The post Raspberry Pi mineral oil tank with added pizzazz appeared first on Raspberry Pi.

Hack your old Raspberry Pi case for the Raspberry Pi 4

Par Alex Bate

Hack your existing Raspberry Pi case to fit the layout of your new Raspberry Pi 4, with this handy “How to hack your existing Raspberry Pi case to fit the layout of your new Raspberry Pi 4” video!

Hack your old Raspberry Pi case to fit your Raspberry Pi 4

Hack your existing official Raspberry Pi case to fit the new Raspberry Pi 4, or treat yourself to the new official Raspberry Pi 4 case. The decision is yours!

How to hack your official Raspberry Pi case

  1. Take your old Raspberry Pi out of its case.
  2. Spend a little time reminiscing about all the fun times you had together.
  3. Reassure your old Raspberry Pi that this isn’t the end, and that it’ll always have a special place in your heart.
  4. Remember that one particular time – you know the one; wipe a loving tear from your eye.
  5. Your old Raspberry Pi loves you. It’s always been there for you. Why are you doing this?
  6. Look at the case. Look at it. Look how well it fits your old Raspberry Pi. Those fine, smooth edges; that perfect white and red combination. The three of you – this case, your old Raspberry Pi, and you – you make such a perfect team. You’re brilliant.
  7. Look at your new Raspberry Pi 4. Yes, it’s new, and faster, and stronger, but this isn’t about all that. This is about all you’ve gone through with your old Raspberry Pi. You’re just not ready to say goodbye. Not yet.
  8. Put your buddy, the old Raspberry Pi, back in its case and set it aside. There are still projects you can work on together; this is not the end. No, not at all.
  9. In fact, why do you keep calling it your old Raspberry Pi? There’s nothing old about it. It still works; it still does the job. Sure, your Raspberry Pi 4 can do things that this one can’t, and you’re looking forward to trying them out, but that doesn’t make this one redundant. Heck, if we went around replacing older models with newer ones all the time, Grandma would be 24 years old and you’d not get any of her amazing Sunday dinners, and you do love her honey-glazed parsnips.
  10. Turn to your new Raspberry Pi 4 and introduce yourself. It’s not its fault that you’re having a temporary crisis. It hasn’t done anything wrong. So take some time to really get to know your new friend.
  11. New friendships take time, and fresh beginnings, dare we say it…deserve new cases.
  12. Locate your nearest Raspberry Pi Approved Reseller and purchase the new Raspberry Pi 4 case, designed especially to make your new Raspberry Pi comfortable and secure.
  13. Reflect that this small purchase of a new case will support the charitable work of the Raspberry Pi Foundation. Enjoy a little warm glow inside. You did good today.
  14. Turn to your old keyboard

The post Hack your old Raspberry Pi case for the Raspberry Pi 4 appeared first on Raspberry Pi.

Record the last seven seconds of everything you see

Par Alex Bate

Have you ever witnessed something marvellous but, by the time you get your camera out to record it, the moment has passed? ‘s Film in the Past hat-mounted camera is here to save the day!

Record the past

As 18-year-old student Johan explains, “Imagine you are walking in the street and you see a meteorite in the sky – obviously you don’t have time to take your phone to film it.” While I haven’t seen many meteorites in the sky, I have found myself wishing I’d had a camera to hand more than once in my life – usually when a friend trips over or says something ridiculous. “Fortunately after the passage of the meteorite, you just have to press a button on the hat and the camera will record the last 7 seconds”, Johan continues. “Then you can download the video from an application on your phone.”

Johan’s project, Film in the Past, consists of a Raspberry Pi 3 with USB camera attached, mounted to the peak of a baseball cap.

The camera is always on, and, at the press of a button, will save the last seven seconds of footage to the Raspberry Pi. You can then access the saved footage from an application on your smartphone. It’s a bit like the video capture function on the Xbox One or, as I like to call it, the option to record hilarious glitches during gameplay. But, unlike the Xbox One, it’s a lot easier to get the footage off the Raspberry Pi and onto your phone.

Fancy building your own? The full Python code for the project can be downloaded via GitHub, and more information can be found on Instructables and Johan’s website.

The post Record the last seven seconds of everything you see appeared first on Raspberry Pi.

Snazzy photographs of Raspberry Pis #SnazzyRPi

Par Alex Bate

If you don’t follow Raspberry Pi on Instagram, you really should, for there you will find #SnazzyRPi, a collection of snazzy-looking Raspberry Pi photographs taken by our very own Fiacre Muller.

Do you have a Raspberry Pi 3 A+? What have you built with it? . And how snazzy is this photo from @fiacremuller?! . . . . . #RaspberryPi #3A+ #RaspberryPi3A+ #Computing

4,412 Likes, 90 Comments – Raspberry Pi (@raspberrypifoundation) on Instagram: “Do you have a Raspberry Pi 3 A+? What have you built with it? . And how snazzy is this photo from…”

Here are a few more to whet your appetite. Enjoy.

Join the #SnazzyRPi revolution and share your Raspberry Pi glamour shots on Instagram using #SnazzyRPi

The post Snazzy photographs of Raspberry Pis #SnazzyRPi appeared first on Raspberry Pi.

❌