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.
Aujourd’hui — 7 juillet 2020Raspberry Pi

Website hosting on Raspberry Pi 4 with Mythic Beasts

Par Alex Bate

Here’s Mythic Beast’s Pete Stevens to talk about how we run the Raspberry Pi website on Raspberry Pis, and how Mythic Beasts can run your site on Raspberry Pis too!

Rent a Raspberry Pi

In late 2016, Mythic Beasts launched a Raspberry Pi cloud, allowing you to rent a Raspberry Pi 3 as a service.

Raspberry Pi 4 is a much more capable computer, with more than twice the performance and, crucially, four times the memory. We were so excited by it, we bet Eben Upton a beer that we could host the launch site for Raspberry Pi 4 on Raspberry Pi 4. We’d demonstrated that it was just about possible to run a normal day on a cluster of eight Raspberry Pi 3s, but launch day is a bit more exciting — tens of millions rather than a million visitors.

Eben, being a fool supremely confident in the work that his team had done, took the bet and let us. On Thursday 20 June 2019, he dropped off eighteen 4GB RAM Raspberry Pi 4 computers that had previously been used in testing. We set about configuring them to replace all the web servers that run the Raspberry Pi blog.

  • 14× Dynamic Web server (PHP/Apache)
  • 2× Static webserver (Apache, flat files)
  • 2× Memcache (in memory store to accelerate web serving)

We started the build on Friday 21 June. We immediately ran into our first ‘chicken and egg’ problem. The Raspberry Pi web servers are built from Puppet, based (at the time) on Debian Jessie. Raspberry Pi 4’s release OS was a not-yet-released version of Debian Buster, which at the time wasn’t supported by Puppet. In conjunction with Greg Annandale at the Raspberry Pi Foundation, we created a Puppet build that would run on Raspberry Pi 4, updated the configuration from Jessie to Buster (newer Apache/PHP), and did some testing.

A rack of Raspberry Pis and a mess of wires connecting them
The enclosures were built to accommodate a larger PoE HAT, which is why this doesn’t stand up beautifully neatly.

We have pre-built enclosures from our Raspberry Pi 3 cloud. We followed the same approach using Power over Ethernet to provide power and data to each Raspberry Pi 4. This dramatically reduces the cabling and complexity of the setup. Late on Friday 21, just over 24 hours after we started, we moved the hastily constructed Raspberry Pi 4 setup to Sovereign House, a key Mythic Beasts data centre and one of the best-connected buildings in Europe.

Over the course of a few hours, we gradually moved the entire production load from the existing virtual servers to the Raspberry Pi 4 cloud and every page from the blog was being served directly off Raspberry Pi 4. We left it for two days to bed in before the real test: launch day.

The launch was almost perfectly smooth. The Raspberry Pi cluster coped fine with the tens of millions of users. However, the Raspberry Pi cluster and website is fronted by Cloudflare, which provides acceleration for static resources and protects the site from denial of service. Unfortunately, they had a two-hour outage in the middle of the launch thanks to a misconfigured internet optimiser run by a customer of Verizon. So the Raspberry Pi 4 cluster had a long lunch break wondering where all the users had gone.

We ran the website on the Raspberry Pi 4 cluster for over a month before reverting back to the usual virtual server-based environment. We’d proved that RaspberryPi 4 would make an awesome hosting platform.

Commercialising Raspberry Pi 4 as a service

We were already running Raspberry Pi 3 as a service for many customers (e.g. PiWheels, which builds Python packages for Raspberry Pi), and being able spin up Raspberry Pi 3 on demand is incredibly useful.

At launch, Raspberry Pi 4 wasn’t suitable. We rely on network boot in order to be able to remotely re-image Raspberry Pi. SD cards just aren’t very reliable; visiting the data centre for manual intervention on every SD card failure is not only expensive in time, but also means we’d have to maintain physical access to every Raspberry Pi 4 in our cloud. Netboot means that we just build large enclosures of 108 Raspberry Pis and seal them in, as they will never require physical attention. If one fails — and we’ve not yet seen one fail — we can shut it down and take it out of our database.

For Raspberry Pi 4 we had to wait for network booting to be a reality. We had access to beta firmware in November 2019 and built a sample Raspberry Pi 4 network boot setup. We then had to integrate it into our management code, build Raspberry Pi 4–compatible operating system images, and enhance our billing to cope with multiple models and by-the-hour billing. Then we had to do a file server and network upgrade: serving lots of machines with true gigabit needs more ‘oomph’ than the 100Mbps of Raspberry Pi 3. This also all needed to be backward-compatible so as not to break the existing Raspberry Pi 3 users. On 17 June 2020 we launched, and Raspberry Pi 4 is now ready to order in our cloud.

Is it any good?

Yes. Raspberry Pi is twice as fast as the same-sized instances in AWS, for a quarter of the price. Just see for yourself:

Raspberry Pi 4 a1.large mg6.medium
Spec 4 cores @ 1.5GHz
4GB RAM
2 cores
4GB RAM
1 core
4GB RAM
Monthly price £8.63 $45.35
(~£36.09)
$34.69
(~ £27.61)
Requests per second 107 52 57
Mean request time 457ms 978ms 868ms
99th percentile request time 791ms 1247ms 1056ms

But what about 8GB and 64-bit Raspberry Pi OS?

That sounds like a jolly nice idea. Keep watching the Mythic Beasts blog for updates.

The post Website hosting on Raspberry Pi 4 with Mythic Beasts appeared first on Raspberry Pi.

Hier — 6 juillet 2020Raspberry Pi

Reducing the load: ways to support novice programmers

Par Sue Sentance

What’s your experience of learning to program? Have you given up and thought it just wasn’t for you? This has been the case for many people — and it’s the focus of a lot of research. Now that teaching programming is in the curriculum in many countries around the world, it’s even more important that we understand what we can do to make learning to program accessible and achievable for all students.

What is cognitive load for learners?

In education, one of the problems thought to cause students difficulty with learning anything — not just programming — is cognitive load. Cognitive load, a concept introduced in the 1980s by John Sweller, has received a lot of attention in the last few years. It is based on the idea that our working memory (the part of our memory that processes what we are currently doing) can only deal with a limited amount of information at any one time. For example, you can imagine that when you are just starting to learn to program, there is an awful lot going on in your working memory, and this can make the task of assimilating it all very challenging; selection, loops, arrays, and objects are all tricky concepts that you need to get to grips with. Cognitive load is a stress on a learner’s working memory, reducing their ability to process and learn new information.

Dr Briana Morrison (University of Nebraska-Omaha)

Finding ways of teaching programming that reduce cognitive load is really key for all of us engaged in computing education, so we were delighted to welcome Dr Briana Morrison (University of Nebraska-Omaha) as the speaker at our latest research seminar. Briana’s talk was titled ‘Using subgoal Labels to Reduce Cognitive Load in Introductory Programming’.

The thrust of Briana’s and her colleagues’ research is that, as educators, we can design instructional experiences around computer programming so that they minimise cognitive load. Using worked examples with subgoal labels is one approach that has been shown to help a lot with this. 

Subgoal labels help students memorise and generalise

Think back to the way you may have learned mathematics: in maths, worked examples are often used to demonstrate how to solve a problem step by step. The same can be done when teaching programming. For example, if we want to write a loop in Python, the teacher can show us a step-by-step approach using an example, and we can then apply this approach to our own task. Sounds reasonable, right?

What subgoal labels add is that, rather than just calling the steps of the worked example ‘Step 1’, ‘Step 2’, etc., the teacher uses memorable labels. For example, a subgoal label might be ‘define and initialise variables’. Such labels not only help us to remember, but more importantly, they help us to generalise the teacher’s example and grasp how to use it for many other applications.

Subgoal labels help students perform better

In her talk, Briana gave us examples of subgoal labels in use and explained how to write subgoal labels, as well as how to work with subject experts to find the best subgoal labels for a particular programming construct or area of teaching. She also shared with us some very impressive results from her team’s research examining the impact of this teaching approach. 

Screenshot of Dr Briana Morrison's research seminar talk

Briana and her colleagues have carried out robust studies comparing students who were taught using subgoals with students who weren’t. The study she discussed in the seminar involved 307 students; students in the group that learned with worked examples containing subgoal labels gave more complete answers to questions, and showed that they could understand the programming constructs at a higher level, than students who learned with worked examples that didn’t contain the subgoal labels. The study also found that the impact of subgoal labels was even more marked for students in at-risk groups (i.e. students at risk of performing badly or of dropping out).

It seems that this teaching approach works really well. The study’s participants were students in introductory computer science classes at university, so it would be interesting to see whether these results can be replicated at school level, where arguably cognitive load is even more of an issue.

Briana’s seminar was very well received, with attendees asking lots of questions about the details of the research and how it could be replicated. Her talk even included some audience participation, which got us all tapping our heads and rubbing our bellies!

Screenshot of Dr Briana Morrison's research seminar talk

Very helpfully, Briana shared a list of resources related to subgoal labels, which you can access via her talk slides on our seminars page.

You can also read more about the background and practical application of cognitive load theory and worked examples including subgoal labels in the Pedagogy Quick Read series we’re producing as part of our work in the National Centre of Computing Education.

Next up in our series

If you missed the seminar, you can find Briana’s presentation slides on our seminars page, where we’ll also soon upload a recording of her talk.

In our next seminar on Tuesday 14 July at 17:00–18:00 BST / 12:00–13:00 EDT / 9:00–10:00 PDT / 18:00–19:00 CEST, we’ll welcome Maria Zapata, Universidad Rey Juan Carlos, Madrid, who will be talking about computational thinking and how we can assess the computational thinking skills of very young children. To join the seminar, simply sign up with your name and email address and we’ll email you the link and instructions. If you attended Briana’s seminar, the link remains the same.

The post Reducing the load: ways to support novice programmers appeared first on Raspberry Pi.

À partir d’avant-hierRaspberry Pi

New keyboards for Portugal, Norway, Sweden, and Denmark

Par Simon Martin

It feels like just yesterday that we released the Raspberry Pi keyboard and hub to the world. Well, it turns out it’s been more than a year, and time really has flown for the next stage of this project, which brings four new language/country options: Portugal, Norway, Sweden, and Denmark. They’re available to buy now from Raspberry Pi Approved Resellers.

Raspberry Pi keyboards

The keyboard and hub has been a great success, with many users adopting our Raspberry Pi red and white colour scheme for their setup. As well as this satisfying uptake of the keyboard on its own, we’ve also sold tens of thousands of Raspberry Pi Desktop Kits which include a keyboard, alongside the official mouse, Beginners Guide and, of course, a Raspberry Pi.

Raspberry Pi official keyboard
If I say so myself, it’s quite a cool-looking desktop setup, with the boxes and cables all colour-coordinated.

We made the black and grey set up for users who own a black and grey Raspberry Pi case, but, with four out of five people choosing the red and white variant, it just goes to show what a bit of company branding can do for business!

We’ve found that the US keyboard is the most popular model, with over half our users choosing that option. As a Brit, I prefer the chunkier Enter key of the UK keyboard.

Close-up photo of UK keyboard Enter key
Easy to find

New variants

There is always a demand to support more users with keyboards to match their country and language so, as a second phase, we are announcing keyboards for the following countries:

  • Portugal
  • Norway
  • Sweden
  • Denmark
Photo: Raspberry Pi Portugal keyboard in red and white
The new European Portuguese variant of our keyboard and hub

These new keyboards are available now in red and white, with black and grey options coming soon. They are just print changes from previously released variants, but the devil proved to be in the detail.

For example, we hoped early on that the Portuguese keyboard would suit users in Brazil too, but we learned that Brazilian and European Portuguese keyboard layouts are quite different. Given the differences between UK and US keyboard layouts, this really shouldn’t have surprised us!

There is a very subtle difference between the Norway and Denmark keyboards. I wonder if anyone can spot it?

  • Norway keyboard template
    Norway
  • Denmark keyboard template
    Denmark
Spot the difference
 

We also discovered that a Finnish keyboard layout exists, but I couldn’t identify any differences between it and the Sweden keyboard. While I don’t speak Finnish, I do speak Swedish – an awesome language that everyone should learn – so I came to these investigations with a bit of relevant knowledge. I found that there are very small changes between different manufacturers, but no consistent differences between Finnish and Swedish keyboards, and ultimately I was guided by what Raspberry Pi OS expects as the correct function for these keyboards. I do hope I am right about these two keyboards being the same… I expect I’ll soon find out in the comments!

Photo: Raspberry Pi Sweden keyboard in red and white
Our new Swedish keyboard. If you know of a way in which a Finnish keyboard should differ from this, please tell us in the comments

We know that many users are waiting for a Japan keyboard variant. We hardly ever talk about new products before they are released, but we’re breaking our rule, in this case, to let you know that we hope to have some news about this very soon – so watch this space!

I’d like to give special thanks to Sherman Liu of Gembird for the new key matrix design, and Craig Wightman of Kinneir Dufort for his patience in designing all the key print revisions.

Happy coding, folks!

The post New keyboards for Portugal, Norway, Sweden, and Denmark appeared first on Raspberry Pi.

Code Jetpac’s rocket building action | Wireframe #40

Par Ryan Lambie

Pick up parts of a spaceship, fuel it up, and take off in Mark Vanstone’s Python and Pygame Zero rendition of a ZX Spectrum classic

The original Jetpac, in all its 8-bit ZX Spectrum glory

For ZX Spectrum owners, there was something special about waiting for a game to load, with the sound of zeros and ones screeching from the cassette tape player next to the computer. When the loading screen – an image of an astronaut and Ultimate Play the Game’s logo – appeared, you knew the wait was going to be worthwhile. Created by brothers Chris and Tim Stamper in 1983, Jetpac was one of the first hits for their studio, Ultimate Play the Game. The game features the hapless astronaut Jetman, who must build and fuel a rocket from the parts dotted around the screen, all the while avoiding or shooting swarms of deadly aliens.

This month’s code snippet will provide the mechanics of collecting the ship parts and fuel to get Jetman’s spaceship to take off.  We can use the in-built Pygame Zero Actor objects for all the screen elements and the Actor collision routines to deal with gravity and picking up items. To start, we need to initialise our Actors. We’ll need our Jetman, the ground, some platforms, the three parts of the rocket, some fire for the rocket engines, and a fuel container. The way each Actor behaves will be determined by a set of lists. We have a list for objects with gravity, objects that are drawn each frame, a list of platforms, a list of collision objects, and the list of items that can be picked up.

Jetman jumps inside the rocket and is away. Hurrah!

Our draw() function is straightforward as it loops through the list of items in the draw list and then has a couple of conditional elements being drawn after. The update() function is where all the action happens: we check for keyboard input to move Jetman around, apply gravity to all the items on the gravity list, check for collisions with the platform list, pick up the next item if Jetman is touching it, apply any thrust to Jetman, and move any items that Jetman is holding to move with him. When that’s all done, we can check if refuelling levels have reached the point where Jetman can enter the rocket and blast off.

If you look at the helper functions checkCollisions() and checkTouching(), you’ll see that they use different methods of collision detection, the first being checking for a collision with a specified point so we can detect collisions with the top or bottom of an actor, and the touching collision is a rectangle or bounding box collision, so that if the bounding box of two Actors intersect, a collision is registered. The other helper function applyGravity() makes everything on the gravity list fall downward until the base of the Actor hits something on the collide list.

So that’s about it: assemble a rocket, fill it with fuel, and lift off. The only thing that needs adding is a load of pesky aliens and a way to zap them with a laser gun.

Here’s Mark’s Jetpac code. To get it running on your system, you’ll need to install Pygame Zero. And to download the full code and assets, head here.

Get your copy of Wireframe issue 40

You can read more features like this one in Wireframe issue 40, available directly from Raspberry Pi Press — we deliver worldwide.

And if you’d like a handy digital version of the magazine, you can also download issue 40 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 Jetpac’s rocket building action | Wireframe #40 appeared first on Raspberry Pi.

OpenVX API for Raspberry Pi

Par Alex Bate

Raspberry Pi is excited to bring the Khronos OpenVX 1.3 API to our line of single-board computers. Here’s Kiriti Nagesh Gowda, AMD‘s MTS Software Development Engineer, to tell you more.

OpenVX for computer vision

OpenVX™ is an open, royalty-free API standard for cross-platform acceleration of computer vision applications developed by The Khronos Group. The Khronos Group is an open industry consortium of more than 150 leading hardware and software companies creating advanced, royalty-free acceleration standards for 3D graphics, augmented and virtual reality, vision, and machine learning. Khronos standards include Vulkan®, OpenCL™, SYCL™, OpenVX™, NNEF™, and many others.

Now with added Raspberry Pi

The Khronos Group and Raspberry Pi have come together to work on an open-source implementation of OpenVX™ 1.3, which passes the conformance on Raspberry Pi. The open-source implementation passes the Vision, Enhanced Vision, & Neural Net conformance profiles specified in OpenVX 1.3 on Raspberry Pi.

Application developers may always freely use Khronos standards when they are available on the target system. To enable companies to test their products for conformance, Khronos has established an Adopters Program for each standard. This helps to ensure that Khronos standards are consistently implemented by multiple vendors to create a reliable platform for developers. Conformant products also enjoy protection from the Khronos IP Framework, ensuring that Khronos members will not assert their IP essential to the specification against the implementation.

OpenVX enables a performance and power-optimized computer vision processing, especially important in embedded and real-time use cases such as face, body, and gesture tracking, smart video surveillance, advanced driver assistance systems (ADAS), object and scene reconstruction, augmented reality, visual inspection, robotics, and more. The developers can take advantage of using this robust API in their application and know that the application is portable across all the conformant hardware.

Below, we will go over how to build and install the open-source OpenVX 1.3 library on Raspberry Pi 4 Model B. We will run the conformance for the Vision, Enhanced Vision, & Neural Net conformance profiles and create a simple computer vision application to get started with OpenVX on Raspberry Pi.

OpenVX 1.3 implementation for Raspberry Pi

The OpenVX 1.3 implementation is available on GitHub. To build and install the library, follow the instructions below.

Build OpenVX 1.3 on Raspberry Pi

Git clone the project with the recursive flag to get submodules:

git clone --recursive https://github.com/KhronosGroup/OpenVX-sample-impl.git

Note: The API Documents and Conformance Test Suite are set as submodules in the sample implementation project.

Use the Build.py script to build and install OpenVX 1.3:

cd OpenVX-sample-impl/
python Build.py --os=Linux --venum --conf=Debug --conf_vision --enh_vision --conf_nn

Build and run the conformance:

export OPENVX_DIR=$(pwd)/install/Linux/x32/Debug
export VX_TEST_DATA_PATH=$(pwd)/cts/test_data/
mkdir build-cts
cd build-cts
cmake -DOPENVX_INCLUDES=$OPENVX_DIR/include -DOPENVX_LIBRARIES=$OPENVX_DIR/bin/libopenvx.so\;$OPENVX_DIR/bin/libvxu.so\;pthread\;dl\;m\;rt -DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON -DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON ../cts/
cmake --build .
LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance

Sample application

Use the open-source samples on GitHub to test the installation.

The post OpenVX API for Raspberry Pi appeared first on Raspberry Pi.

Volunteer your Raspberry Pi to IBM’s World Community Grid

Par Alex Bate

IBM’s World Community Grid is working with scientists at Scripps Research on computational experiments to help find potential COVID-19 treatments. Anyone with a Raspberry Pi and an internet connection can help.

Why is finding potential treatments for COVID-19 so important?

Scientists all over the globe are working hard to create a vaccine that could help prevent the spread of COVID-19. However, this process is likely to take many months — or possibly even years.

In the meantime, scientists are also searching for potential treatments for the symptoms of COVID-19. A project called OpenPandemics – COVID-19 is one such effort. The project is led by researchers in the Forli Lab at Scripps Research, who are enlisting the help of World Community Grid volunteers.

What is World Community Grid and how does it work? 

World Community Grid is an IBM social responsibility initiative that supports humanitarian scientific research. 

Image text reads: Accelerate research with no investment of time or money. When you become a World Community Grid volunteer, you donate your device's spare computing power to help scientists solve the world's biggest problems in health and sustainability.

As a World Community Grid volunteer, you download a secure software program to your Raspberry Pi, macOS or Windows computer, or Android device. This software program (called BOINC) is used to run World Community Grid projects, and is compatible with the Raspberry Pi OS and most other operating systems. Then, when your device is not using its full power, it automatically runs a simulated experiment in the background that will help predict the effectiveness of a particular chemical compound as a possible treatment for COVID-19. Finally, your device automatically returns the results of the completed simulation and requests the next simulation.

Over the course of the project, volunteers’ devices will run millions of simulations of small molecules interacting with portions of the virus that causes COVID-19. This is a process known as molecular docking, which is the study of how two or more molecules fit together. When a simulated chemical compound fits, or ‘docks’, with a simulation of part of the virus that causes COVID-19, that interaction may point to a potential treatment for the disease.

An image of a calendar with the text: Get results that matter. As a World Community Grid volunteer, your device does research calculations when it's idle, so just by using it as. you do every dat you can help scientists get results in months instead of decades. With your help, they can identify the most important areas to study in the lab, bringing them one step closer to discoveries that save lives and address global problems.

World Community Grid combines the results from your device along with millions of results from other volunteers all over the world and sends them to the Scripps Research team for analysis. While this process doesn’t happen overnight, it accelerates dramatically what would otherwise take many years, or might even be impossible.

OpenPandemics – COVID-19 is the first World Community Grid project to harness the power of Raspberry Pi devices, but the World Community Grid technical team is already working to make other projects available for Raspberry Pi very soon.

Getting ready for future pandemics

Scientists have learned from past outbreaks that pandemics caused by newly emerging pathogens may become more and more common. That’s why OpenPandemics – COVID-19 was designed to be rapidly deployed to fight future diseases, ideally before they reach a critical stage.

A image of a scientist using a microscope. Text reads: Your device could help search for potential treatments for COVID-19. Scientists are using World Community Grid to accelerate the search for treatments to COVIS-19. The tools and techniques the scientists develop to fight COVID-19 could be used in the future by all researchers to help more quickly find treatments for potential pandemics

To help address future pandemics, researchers need access to swift and effective tools that can be deployed very early, as soon as a threatening disease is identified. So, the researchers behind OpenPandemics – COVID-19 are creating a software infrastructure to streamline the process of finding potential treatments for other diseases. And in keeping with World Community Grid’s open data policy, they will make their findings and these tools freely available to the scientific community. 

Join a global community of science supporters

World Community Grid is thrilled to make OpenPandemics – COVID-19 available to everyone who wants to donate computing power from their Raspberry Pi. Every device can play a part in helping the search for COVID-19 treatments. Please join us!

The post Volunteer your Raspberry Pi to IBM’s World Community Grid appeared first on Raspberry Pi.

Be a better Scrabble player with a Raspberry Pi High Quality Camera

Par Ashley Whittaker

One of our fave makers, Wayne from Devscover, got a bit sick of losing at Scrabble (and his girlfriend was likely raging at being stuck in lockdown with a lesser opponent). So he came up with a Raspberry Pi–powered solution!

Using a Raspberry Pi High Quality Camera and a bit of Python, you can quickly figure out the highest-scoring word your available Scrabble tiles allow you to play.

Hardware

  • Raspberry Pi 3B
  • Compatible touchscreen
  • Raspberry Pi High Quality Camera
  • Power supply for the touchscreen and Raspberry Pi
  • Scrabble board

You don’t have to use a Raspberry Pi 3B, but you do need a model that has both display and camera ports. Wayne also chose to use an official Raspberry Pi Touch Display because it can power the computer, but any screen that can talk to your Raspberry Pi should be fine.

Software

Firstly, the build takes a photo of your Scrabble tiles using raspistill.

Next, a Python script processes the image of your tiles and then relays the highest-scoring word you can play to your touchscreen.

The key bit of code here is twl, a Python script that contains every possible word you can play in Scrabble.

From 4.00 minutes into his build video, Wayne walks you through what each bit of code does and how he made it work for this project, including how he installed and used the Scrabble dictionary.

Fellow Scrabble-strugglers have suggested sneaky upgrades in the comments of Wayne’s YouTube video, such having the build relay answers to a more discreet smart watch.

No word yet on how the setup deals with the blank Scrabble tiles; those things are like gold dust.

In case you haven’t met the Raspberry Pi High Quality Camera yet, Wayne also did this brilliant unboxing and tutorial video for our newest piece of hardware.

And for more projects from Devscover, check out this great Amazon price tracker using a Raspberry Pi Zero W, and make sure to subscribe to the channel for more content.

The post Be a better Scrabble player with a Raspberry Pi High Quality Camera appeared first on Raspberry Pi.

Let’s learn about encryption with Digital Making at Home!

Par Kevin Johnson

Join us for Digital Making at Home: this week, young people can learn about encryption and e-safety with us! With Digital Making at Home, we invite kids all over the world to code along with us and our new videos every week.

So get ready to decode a secret message with us:

Check out this week’s code-along projects!

And tune in on Wednesday 2pm BST / 9am EDT / 7.30pm IST at rpf.io/home to code along with our live stream session.

PS: If you want to learn how to teach students in your classroom about encryption and cybersecurity, we’ve got the perfect free online courses for you!

The post Let’s learn about encryption with Digital Making at Home! appeared first on Raspberry Pi.

Wes’s wonderful Minecraft user notification display

Par Alex Bate

This Minecraft sign uses a Raspberry Pi to notify you when, and how many of, your friends are logged into your dedicated Minecraft server.

Let’s start by pointing out how wonderfully nostalgic many of Wes ‘Geeksmithing’ Swain’s projects are. From his Raspberry Pi–housing cement Thwomp that plays his favourite Mario games to The NES Project, his NES replica unit with a built-in projector — Wes makes the things we wished for as kids.

The NES Project covered in HackSpace magazine

We honestly wouldn’t be surprised if his next project is a remake of Duckhunt with servo-controlled ducks, or Space Invaders but it’s somehow housed in a flying space invader that shoots back with lasers. Honestly, at this point, we wouldn’t put it past him.

Making the Minecraft friend notification display

In the video, Wes covers the project in two parts. Firstly, he shows off the physical build of making the sign, including laser-cut acrylic front displayed with controllable LED lights, a Raspberry Pi Zero, and the wooden framing.

Secondly, he moves on to the code, in which he uses mcstatus, a Python class created by Minecraft’s Technical Director Nathan Adams that can be used to query servers for information. In this instance, Wes is using mcstatus to check for other players on his group’s dedicated Mincecraft server, but the class can also be used to gather mod information. You can find mcstatus on GitHub.

Each friend is assigned a letter that illuminates if they’re online.

Lucky for Wes, he has the same number of friends on his server as the number of letters in ‘Minecraft’, so for every friend online, he’s programmed the display to illuminate a letter of the Minecraft logo. And while the server is empty, he can also set the display to run through various light displays, including this one, a dedication to the new Minecraft Nether update.

If you’d like to try making this project yourself, you can: Wes goes into great detail in his video, and the code for the project can be found on his GitHub account.

And while we have your attention, be sure to subscribe to Geeksmithing on YouTube and show him some love for such a great project.

The post Wes’s wonderful Minecraft user notification display appeared first on Raspberry Pi.

(Raspberry) Pi Commander | The MagPi 95

Par Rob Zwetsloot

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

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

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

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

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

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

Taking off

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

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

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

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

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

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

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

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

Flying high

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

Read The MagPi for free!

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

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

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

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

How we are helping you with computing teaching strategies

Par Sue Sentance

One aspect of our work as part of the National Centre for Computing Education (NCCE) is producing free materials for teachers about teaching strategies and pedagogy in computing. I am excited to introduce these materials to you here!

Teachers are asking us about teaching strategies

Computing was included in the national curriculum in England in 2014, and after this, continued professional development (CPD) initiatives became available to support teachers to feel confident in topics they had not previously studied. Much of the CPD focussed on learning about programming, algorithms, networking, and how computers work.

Instructor explaining corporate software specific to trainees in computer class. Man and women sitting at table, using desktop, pointing at monitor and talking. Training concept

More recently however, I’ve found that increasing numbers of teachers are asking for support around teaching strategies, particularly for how to support students who find programming and other aspects of computing difficult. Computing is a relatively new subject, but more and more research results are showing how to best teach it.

We offer CPD with our online courses

As part of the NCCE, we produce lots of free resources to support teachers with developing knowledge and skills in all aspects of computing. The NCCE’s Computing Hubs offer remotely delivered sessions, and we produce interactive, in-depth, free online courses for teachers to take over 3 or 4 weeks. Some of these online courses are about subject knowledge, while others focus on how to teach computing, the area referred to as pedagogical content knowledge*. For example, two of our courses are Programming Pedagogy in Primary Schools and Programming Pedagogy in Secondary Schools. Our pedagogy courses draw on the expertise and experience of many computing teachers working with students right now.

We share best practices in computing pedagogy

But that’s not all! We continually share tried and tested strategies for use in the computing classroom to help teachers, and those training to teach, support students more effectively. We believe that computing is for everyone and as such, we need a variety of possible approaches to teaching each topic up our collective sleeves, to ensure accessibility for all our students.

We develop all of this material in collaboration with in-the-classroom-now, experienced teachers and other experts, also drawing upon the latest computing education research. Our aim is to give you great, practical ideas for how to engage students who may be unmotivated or switched off, and new strategies to help you support students’ understanding of more complex computing concepts.

We support you to do classroom action research

One of the findings from decades of educational research is that teacher action research in the classroom is an extremely effective form of CPD! Teacher action research means reflecting on what the barriers to learning are in your classroom, planning an intervention (often in the form of a specific change to your teaching practice), and then evaluating whether it engenders improvement. Doing this has positive impacts both on your expertise as a teacher and on your students’ learning!

To support you with action research, we’re launching a special programme for classroom action research in computing. This takes the form of an online course, facilitated by experts in the field, lasting over a six-month period. Find out more about this opportunity.

Share your experiences with us

Right now we’re in unusual times, and surviving various combinations of home learning and remote delivery with your classes may be your greatest concern. However you’re getting on, we’d love to hear from you about your classroom practice in computing. Your experience with different ways of teaching computing in the classroom will add to our collective understanding about what works for teaching students. You can share your feedback with us, or get in touch with our pedagogy team at research@teachcomputing.org.

Other ways to learn and stay in touch:

*Back in 1987, Lee Shulman wrote: “Pedagogical content knowledge represents the blending of content and pedagogy into an understanding of how particular topics, problems or issues are organised, represented, and adapted to the diverse interests and abilities of learners, and presented for instruction.”

The post How we are helping you with computing teaching strategies appeared first on Raspberry Pi.

Raspberry Pi High Quality Camera powers up homemade microscope

Par Ashley Whittaker

Wow, DIY-Maxwell, wow. This reddit user got their hands on one of our new Raspberry Pi High Quality Cameras and decided to upgrade their homemade microscope with it. The brains of the thing are also provided by a Raspberry Pi.

Key features

  • Raspberry Pi OS
  • 8 MegaPixel CMOS camera (Full HD 30 fps video)
  • Imaging features from several centimetres to several micrometers without changing the lens
  • 6 stepper motors (X, Y, tilt, rotation, magnification, focus)
  • Variable speed control using a joystick controller or keyboard
  • Uniform illumination for imaging reflective surface
  • Modular design: stages and modules can be arranged in any configuration depending on the application

Here’s what a penny looks like under this powerful microscope:

Check out this video from the original reddit post to see the microscope in action.

Bill of materials

Click image to enlarge

The user has put together very detailed, image-led build instructions walking you through how to create the linear actuators, camera setup, rotary stage, illumination, title mechanism, and electronics.

The project uses a program written in Python 3 (MicroscoPy.py) to control the microscope, modify camera settings, and take photos and videos controlled by keyboard input.

Click image to enlarge

Here is a quick visual to show you the exact ports you need for this project on whatever Raspberry Pi you have:

Click image to enlarge

In the comments of the original reddit post, DIY_Maxwell explains that $10 objective lens used in the project limited the Raspberry Pi High Quality Camera’s performance. They predict you can expect even better images with a heavier investment in the lens.

The project is the result of a team at IBM Research–Europe, in Zurich, who develop microfluidic technologies for medical applications, needing to provide high-quality photos and videos of their microfluidic chips.

In a blog for IEEE Spectrum, IBM team member Yuksel Temiz explains: “Taking a photo of a microfluidic chip is not easy. The chips are typically too big to fit into the field of view of a standard microscope, but they have fine features that cannot be resolved using a regular camera. Uniform illumination is also critical because the chips are often made of highly reflective or transparent materials. Looking at publications from other research groups, it’s obvious that this is a common challenge. With this motivation, I devoted some of my free time to designing a multipurpose and compact lab instrument that can take macro photos from almost any angle.”

Here’s the full story about how the Raspberry Pi-powered creation came to be.

And for some extra-credit homework, you can check out this document comparing the performance of the microscope using our Raspberry Pi Camera Module v2 and the High Quality Camera. The key takeaway for those wishing to upgrade their old projects with the newer camera is to remember that it’s heavier and 50% bigger, so you’ll need to tweak your housing to fit it in.

The post Raspberry Pi High Quality Camera powers up homemade microscope appeared first on Raspberry Pi.

OctoPrint: a baby monitor for your 3D printer

Par Andrew Gregory

In issue 32 of HackSpace magazine, out now, we talk to Gina Häußge, creator of OctoPrint – it sits on a Raspberry pi and monitors your 3D printer.

Gina Häußge, creator and maintainer of OctoPrint

There’s something enchanting about watching a 3D printer lay down hot plastic. Seeing an object take shape before your eyes is utterly compelling, which is perhaps why we love watching 3D printing time-lapse videos so much.

Despite this, it would be impractical and inefficient to sit and watch every time you sent a print job through. That’s why we should all be grateful for OctoPrint. This free, open-source software monitors your 3D printer for you, keeping you from wasting plastic and ensuring that you can go about your business without fearing for your latest build.
OctoPrint is the creation of Gina Haüßge. We enjoyed a socially distant chat with her about the challenges of running an open-source project, making, and what it’s like to have a small project become huge.

HackSpace: Most people who have used a 3D printer will have heard of OctoPrint, but for the benefit of those who haven’t, what is it?

Gina Haüßge: Somebody once called it a baby monitor for your 3D printer. I really like this description. It’s pretty much a combination of a baby monitor and a remote control, because it allows you to go through any web browser on your network and monitor what your printer is currently up to, how much the current job has progressed. If you have a webcam set up, it can show you the print itself, so you can see that everything is working correctly, it’s still on the bed, and all that.

It also offers a plug-in interface so that it can be expanded with various features and functionality, and people have written a ton of integrations with notification systems. And all of this runs on pretty much any system that runs Python. I have to say Python, not MicroPython, the full version. Usually Linux, and the most common use case is to run it on a Raspberry Pi, and this is also how I originally set it out to work.

Most people think it only runs on a Raspberry Pi, but no. It will run on any old laptop that you still have lying around. It’s cross-platform, so you don’t need to buy a Raspberry Pi if you have another machine that will fit the bill.

OctoPrint is most commonly run on a Raspberry Pi

HS: How long have you been working on it?

GH: I originally sat down to write it over my Christmas break in 2012, because I had got my first 3D printer back then. It was sitting in my office producing fumes and noise for hours on end, which was annoying when trying to work, or game, or anything else.

I thought there must be a solution involving attaching one of these nifty new Raspberry Pis that had just come out. Someone must have written something, right? I browsed around the internet, realised that the closest thing to what I was looking for treated the printer as a black box – to fire job data at it and hope that it gets it right. That was not what I wanted; I wanted this feedback channel. I wanted to see what was happening; I wanted to monitor the temperatures; I wanted to monitor the job progress.

The very first version back then was a plug-in for Cura, before Cura even supported plug-ins. After my Christmas break, I went, OK, it’s doing everything I wanted it to do; back to work at my normal regular job. And then it exploded. I started getting emails, issue reports, and feature requests from all over the world. ‘Can you make it also do this?’ ‘Hey, I have this other printer with this slightly different firmware that behaves like this; can you adapt it so that it works with this?’. ‘Can you remove it from Cura, and have it so it works standalone?’ Suddenly I had this huge open-source project on my hands. I didn’t do any kind of promotion for it or anything like that. I just posted about it in a Google+ community, of all things, and from there it grew by word of mouth.

A year or so later, I reduced my regular job to 80%, to have one day a week for OctoPrint, but that didn’t suffice either with everything that was going on. Then I had the opportunity to go full-time, sponsored by a single company who also made 3D printers, and they ran out of money in 2016. That was when I turned to crowdfunding, which has been the mode of operation ever since. Around 95% of everything that is done on OctoPrint is run by me, and I work on it full-time now. Since 2014.

A lot of the stuff that I have been adding over the years, for instance, the plug-in system itself, would not have been possible as a pet side project, not with a day job.

HS: What are you working on at the moment?

GH: In March just gone, I released the next big version, to make OctoPrint Python 3-compatible, because at the start of the year Python was deemed end of life, so I had to do something. The problem is that there’s a flourishing plug-in ecosystem written in Python 2, so for now, I’m stuck with having to support both, and trying to motivate the plug-in maintainers to also migrate, which is a ton of fun actually. I wrote a migration guide, tracking in the plug-in repository how many plugs are compatible. Newly registered plug-ins have to be compatible too.

HS: Do you have any idea how many people use OctoPrint?

GH: Nine months, a year ago, I introduced usage tracking. It’s my own bundled plug-in that ships with OctoPrint that does anonymous user tracking through my own platform, so no GDPR issues should arise there. And what this shows me is that, over the course of the last seven days, I saw 66,000 instances, and the last 30 days, I saw 91,000 instances.

But that’s only those who have opted into the usage tracking, which obviously is only a fraction. I have no idea about the fraction – whether the real number is five times, ten times higher, I’ve no way of knowing.

When I did the most recent big update, I got some statistics back from piwheels [a Python package repository]. They saw a spike in repositories that were being pulled from their index, which corresponded to dependencies that the new version of OctoPrint depends on, and the spike that they saw corresponded with the day that I rolled out the new version. Based on that, it looks like there’s probably ten times as many instances out there. I didn’t expect that. So the total number of users could be 700,000, it could be over a million, I have no idea. But based on these piwheels stats, it’s in that ballpark.

HS: And are you seeing a growth in those figures?

GH: Yes. Especially now, with the pandemic going on. If you had asked me three or four months ago, just when the pandemic started, I would have told you more like 60,000 per 30 days. So I saw a significant increase. I also saw a significant usage increase in the last couple of weeks.

I also saw a significant increase in support overheads in the last couple of weeks, which was absolutely insane. It was like everyone and their mother wanted to know something from me, writing me emails, opening tickets and all that, and this influx of people has not stopped yet. At first I thought, well I’ll just go into crunch mode and weather this out, but that didn’t work out. I had to find new ways to cope in order to keep this sustainable.

HS: You can’t have crunch mode for three months!

GH: I mean it’s OK for four weeks or so, but then you start to notice side effects on your own well-being. It’s not a good idea. I’m in for the long haul.

HS: Wanting a feedback channel instead of just firing off commands that work silently makes a lot of sense.

GH: It’s not like a paper printer where you fire and forget, so treating it as a black box, where you don’t get anything back on status and all that, is bound to be trouble. This is a complicated machine where a lot of stuff can go wrong, so it makes sense to have a feedback channel — at least that was my intuition back then, and evidently, a lot of people thought the same.

HS: You must have saved people countless hours and hours of wasted time, filament, and energy.

GH: I’ve also heard that I’ve saved at least one marriage! Someone wrote me an email a couple of years ago thanking me because the person had a new printer in their garage and was constantly monitoring it, sitting in front of it. Apparently the wife and kids were not too thrilled by this. They installed OctoPrint, and since then they’ve been happy again.

Get HackSpace magazine issue 31 — out today

HackSpace magazine issue 32: on sale now!

You can read the rest of HackSpace magazine’s interview with Gina Häußge in issue 32, out today and available online from the Raspberry Pi Press online store. You can also download issue 32 for free.

The post OctoPrint: a baby monitor for your 3D printer appeared first on Raspberry Pi.

Let’s do virtual sports with Digital Making at Home!

Par Kevin Johnson

Join us for Digital Making at Home: this week, young people get to make sports games in Scratch! With Digital Making at Home, we invite kids all over the world to code along with us and our new videos every week.

So get ready to exercise your digital making skills with us:

Check out this week’s sporty code-along projects!

And tune in on Wednesday 2pm BST / 9am EDT / 7.30pm IST at rpf.io/home to code along with our live stream session.

The post Let’s do virtual sports with Digital Making at Home! appeared first on Raspberry Pi.

Build an IoT device with Ubuntu Appliance and Raspberry Pi

Par Helen Lynn

The new Ubuntu Appliance portfolio provides free images to help you turn your Raspberry Pi into an IoT device: just install them to your SD card and you have all the software you need to make a media server, get started with home automation, and more. Canonical’s Rhys Davies is here to tell us all about it.

We are delighted to announce the new Ubuntu Appliance portfolio. Together with NextCloud, AdGuard, Plex, Mosquitto and openHAB, we have created the first in a new class of Ubuntu derivatives. Ubuntu Appliances are software-defined projects that enable users to download everything they need to turn a Raspberry Pi into a device that does one thing – beautifully.

The Ubuntu Appliance mission is to enable you to build your own secure, self-updating, single-purpose devices. Tell us what you want to see next, or let’s talk about turning your project into the next Ubuntu Appliance in Discourse. For now, we are excited to bring these initial appliances to your attention.

The initial portfolio of five

  • Plex Media Server allows its users to organise and stream their own collection of movies, TV, music, podcasts and more from one place.
  • Mosquitto is a lightweight open source MQTT message broker, for use on all devices from low power single board computers to full-scale industrial grade servers.
  • OpenHAB is a pluggable architecture that allows users to design rules for automating their home, with time- and event-based triggers, scripts, actions, notifications and voice control.
  • AdGuard Home blocks annoying banners, pop-ups and video ads to make web surfing faster, safer and more comfortable.
  • NextCloud is an on-premise content collaboration platform that allows users to host their own private cloud at home or in the office.

How it all works

Head over to the Ubuntu Appliances website, click the appliance you would like, select download, follow the instructions, and away you go. Once you get to this stage, there are links to tutorials and documentation written by the upstream project themselves, so you can get next steps from the horse’s mouth. If you run into any bother let us know with a new topic and we’ll get on it.

But why bother?

The problem we are trying to solve is to do with the fragmentation in IoT. We want to give publishers and developers a platform to get their software in the hands of their users and into their devices. We work with them to securely bundle the OS, their applications and configurations into a single download that is available for anyone to turn a Raspberry Pi into a dedicated device. You can go to the portfolio and download as many of the appliances as you like and start using them today.

How to add your project to the Ubuntu Appliance portfolio

All of this gives a stage and a secure, production-grade base to projects. There are no restrictions on who can make an Ubuntu Appliance; all you need is an application that runs on a Raspberry Pi or another certified board, and to let us know what you’ve got so we can help you over the line. If you need more information, head to our community page where you’ll find the rules and the exact steps to become featured as an Ubuntu Appliance.

Try them out!

All that’s left to say is to try them out. All five of the initial appliances work on Raspberry Pi, so if you have one, you can get started. And if you don’t have one – maybe your Raspberry Pi is still in the post – then you can also ‘try before you Pi’: install the appliance in a virtual machine and see what you think.

The list of appliances is already growing. This launch marks the first five appliances, but we are already working with developers on the next wave and are looking for more. Start with these ones and go to our discourse to tell us what you think.

Thanks for having me, Raspberry Pi <3

The post Build an IoT device with Ubuntu Appliance and Raspberry Pi appeared first on Raspberry Pi.

The Raspberry Pi Store reopens today

Par Alex Bate

We’re pleased to announce that today, the Raspberry Pi Store in Cambridge re-opens its doors. We have taken care to follow government guidelines to ensure a clean and safe environment for our staff and customers.

 

What to expect

While we’ve removed all interactive activities, you’ll still be able to experience the versatility of Raspberry Pi via our displays, and our staff will be on hand to talk you through any projects you’d like to know more about.

To make sure everyone can maintain physical distancing, we’re limiting numbers to a maximum of seven customers in the store at a time. We’ve also marked a one-way route around the store to help you shop without squeezing past others.

We have trained all our colleagues in the Raspberry Pi Store team in current health and safety measures, and they’ll be working hard to keep all surfaces sanitised while continuing to offer advice and support to our visitors.

Our newly revised opening times align with those of the Grand Arcade shopping centre, and we’re working closely with centre management to continue to follow updated government guidelines.

Fully stocked

Everything is in stock. From the new 8GB Raspberry Pi 4 and the 8GB Desktop Kit to the High Quality Camera and its companion book, The Official Raspberry Pi Camera Guide, all our recently released products are in stock and ready to go.

We’re also continuing to stock and sell gift cards, third-party products, and in-store exclusives.

How you can help us

If you plan to visit the Raspberry Pi Store, please continue to exercise social distancing by keeping 2m between yourself and others. Please use our free hand sanitiser when you enter the store, and, if you can, wear a face mask to protect both yourself and others.

Come along!

So, if you happen to be in Cambridge, please pop in and say hi… from a distance. And, if you have any further questions, visit the Raspberry Pi Store webpage, where you’ll find our FAQs, directions to the store, and contact details.

The post The Raspberry Pi Store reopens today appeared first on Raspberry Pi.

Tim Peake is among our fabulous Coolest Projects judges

Par Helen Drury

We are thrilled that five fantastic people will contribute to the Coolest Projects online showcase: Tim Peake, Limor Fried, Mitch Resnick, Hayaatun Sillem, and Eben Upton are going to be our special judges and choose their favourite projects from among all the entries from young tech creators in our global community.

Meet the coolest judges!

Tim Peake is a British ESA astronaut and a passionate advocate for STEM education. Tim played a huge part in the first Astro Pi Challenge in 2015, and he has helped us spread the word about the work of the Raspberry Pi Foundation ever since.

“By taking part in Coolest Projects, young creators get to share their ideas with the world, and their peers. Whether it’s creating something for home, the planet, or for their school or community — it’s a great opportunity to share their hopes and dreams for the future!” — Tim Peake

Limor ‘Ladyada’ Fried is an MIT engineer and the founder and owner of Adafruit, a company that creates hardware and educational resources for anyone interested in digital making. Limor personally selects, tests, and approves all the tools, equipment, and electronics on offer by Adafruit.

Limor Fried at Adafruit Industries

“Coolest Projects is a fantastic opportunity for young people to take part in the world’s leading technology showcase and to celebrate all the hard work and ideas from the community — all from home!” – Limor Fried

Mitch Resnick is Professor of Learning Research at the MIT Media Lab, and his Lifelong Kindergarten research group develops the Scratch programming software and online community! His life’s passion is developing new technologies and activities to engage young people in creative learning experiences.

Mitch Resnick,

Hayaatun Sillem is the CEO of the Royal Academy of Engineering, which brings together the UK’s leading engineers and technologists to promote engineering excellence for the benefit of society. She also has a PhD in cancer research!Hayaatun Sillem, CEO Royal Academy of Engineering

Eben Upton is a founder of the Raspberry Pi Foundation and one of the inventors of the Raspberry Pi computer. As the CEO of Raspberry Pi Trading Ltd, he oversees the company, including the development of all our hardware.

Register a project today!

If a young person you know is making anything with technology — and we mean anything, from robot to smartphone app to video game to Scratch animation to web page about their favourite food — then we invite them to take part in the Coolest Projects online showcase.

We welcome all works-in-progress and finished projects from anyone aged up to 18!

To find out more and register a project by the 28 June deadline, visit coolestproject.org.

The post Tim Peake is among our fabulous Coolest Projects judges appeared first on Raspberry Pi.

Learning with Raspberry Pi — robotics, a Master’s degree, and beyond

Par Ashley Whittaker

Meet Callum Fawcett, who shares his journey from tinkering with the first Raspberry Pi while he was at school, to a Master’s degree in computer science and a real-life job in programming. We also get to see some of the awesome projects he’s made along the way.


I first decided to get a Raspberry Pi at the age of 14. I had already started programming a little bit before and found that I really enjoyed the language Python. At the time the first Raspberry Pi came out, my History teacher told us about them and how they would be a great device to use to learn programming. I decided to ask for one to help me learn more. I didn’t really know what I would use it for or how it would even work, but after a little bit of help at the start, I quickly began making small programs in Python. I remember some of my first programs being very simple dictionary-type programs in which I would match English words to German to help with my German homework.

Learning Linux, C++, and Python

Most of my learning was done through two sources. I learnt Linux and how the terminal worked using online resources such as Stack Overflow. I would have a problem that I needed to solve, look up solutions online, and try out commands that I found. This was perhaps the hardest part of learning how to use a Raspberry Pi, as it was something I had never done before, but it really helped me in later years when I would use Linux more than Windows. For learning programming, I preferred to use books. I had a book for C++ and a book for Python that I would work through. These were game-based books, so many of the fun projects that I did were simple text-based games where you typed in responses to questions.

A family robotics project

The first robot Callum made using a Raspberry Pi

By far the coolest project I did with the Raspberry Pi was to build a small robot (shown above). This was a joint project between myself and my dad. He sorted out the electronics and I programmed the robot. It was a great opportunity to learn about robotics and refine my programming skills. By the end, the robot was capable of moving around by itself, driving into objects, and then reversing and trying a new direction. It was almost like an unintelligent Roomba that couldn’t hoover, but I spent many hours improving small bits and pieces to make it as easy to use as possible. My one wish that I never managed to achieve with my robot was allowing it to map out its surroundings. This was a very ambitious project at the time, since I was still quite inexperienced in programming. The biggest problem with this was calibrating the robot’s turning circle, which was never consistent so it was very hard to have the robot know where in the room it was.

Sense HAT maze game

Another fun project that I worked on used the Sense HAT developed for the Astro Pi computers for use on the International Space Station. Using this, I was able to make a memory maze game (shown below), in which a player is shown a maze for several seconds and then has to navigate that maze from memory by shaking the device. This was my first introduction to using more interactive types of input, and this eventually led to my final-year project, which used these interesting interactions to develop another way of teaching.

Learning programming without formal lessons

I have now just finished my Master’s degree in computer science at the University of Bristol. Before going to university, I had no experience of being taught programming in a formal environment. It was not a taught subject at my secondary school or sixth form. I wanted to get more people at my school interested in this area of study though, which I did by running a coding club for people. I would help others debug their code and discuss interesting problems with them. The reason that I chose to study computer science is largely because of my experiences with Raspberry Pi and other programming I did in my own time during my teenage years. I likely would have studied history if it weren’t for the programming I had done by myself making robots and other games.

Raspberry Pi has continued to play a part in my degree and extra-curricular activities; I used them in two large projects during my time at university and used a similar device in my final project. My robot experience also helped me to enter my university’s ‘Robot Wars’ competition which, though we never won, was a lot of fun.

A tool for learning and a device for industry

Having a Raspberry Pi is always useful during a hackathon, because it’s such a versatile component. Tech like Raspberry Pi will always be useful for beginners to learn the basics of programming and electronics, but these computers are also becoming more and more useful for people with more experience to make fun and useful projects. I could see tech like Raspberry Pi being used in the future to help quickly prototype many types of electronic devices and, as they become more powerful, even being used as an affordable way of controlling many types of robots, which will become more common in the future.

Our guest blogger Callum

Now I am going on to work on programming robot control systems at Ocado Technology. My experiences of robot building during my years before university played a large part in this decision. Already, robots are becoming a huge part of society, and I think they are only going to become more prominent in the future. Automation through robots and artificial intelligence will become one of the most important tools for humanity during the 21st century, and I look forward to being a part of that process. If it weren’t for learning through Raspberry Pi, I certainly wouldn’t be in this position.

Cheers for your story, Callum! Has tinkering with our tiny computer inspired your educational or professional choices? Let us know in the comments below. 

The post Learning with Raspberry Pi — robotics, a Master’s degree, and beyond appeared first on Raspberry Pi.

Raspberry Pi–powered bonsai watering system

Par Ashley Whittaker

Bonsai trees are the most glorious of miniature shrubbery. But caring for them takes seriously green fingers. Luckily, this Raspberry Pi–powered bonsai watering system doesn’t require much to get started. Also, the Reddit user who shared the project is named Lord-of-the-Pis, so, we love.

You will need:

  • Raspberry Pi
  • Submersible water pump
  • Jumper wires

The Pimoroni Explorer HAT Pro isn’t essential to make this project work, it just makes things a whole lot easier by removing the need for a relay. It also comes with a Python library for interfacing with Raspberry Pi. The project uses an I2C connection, so it would also be possible to not use the HAT and instead plug a moisture sensor into an analogue-to-digital converter and then into Raspberry Pi’s GPIO pins.

How was it done?

Lord-of-the-Pis explains: “I used the Pimoroni Explorer HAT Pro in order to make the entire system on a small breadboard on top of  Raspberry Pi. The Explorer HAT has inbuilt analogue inputs over I2C, which I used for the input of the moisture sensor (two wires pushed into the soil as probes). Furthermore, the output GPIO pins on this HAT sink all current to ground when activated so they can be used as a transistor to power the small 5V motor (which was also attached to the 5V power pins on Raspberry Pi).”

Using the HAT also allowed this maker to simply hook the pump up to the GPIO pins and turn these on and off, so there’s no need for an on/off switch.

How does it work?

This project’s code is in Python 3, and you can find it all on GitHub.

The main watering program (plantWater.py) takes input from the moisture sensor, and if the soil moisture level is below a set amount, the bonsai gets watered.

Lord-of-the-Pis built a simple web interface for the project on a  localhost site that’s hosted using Apache. Apache SSI is used to execute the Python scripts. Due to the use of SSI, the index page is called index.shtml.

An image of the website. The Dip and then steadiness of the graph is due to the faulty moisture sensor. The maker has ordered another!

A lot more detail about the hardware and software involved is available in this second reddit post about the project.

Lord-of-the-Pis is now working on a dashboard that plots the soil moisture over time, as well as tracking other things like light intensity, temperature, and humidity.

May no other plant perish due to overwatering on our watch ever again!

The post Raspberry Pi–powered bonsai watering system appeared first on Raspberry Pi.

Let’s make it 3D with Digital Making at Home!

Par Kevin Johnson

Join us for Digital Making at Home, where this week, young people get to create all things 3D. With Digital Making at Home, we invite kids all over the world to code along with us and our new videos every week!

So get ready to visit a new digital dimension with us:

Check out this week’s code-along videos!

And tune in on Wednesday at 2pm BST / 9am EDT / 7.30pm IST at rpf.io/home to code along with our live stream session.

The post Let’s make it 3D with Digital Making at Home! appeared first on Raspberry Pi.

Mathematics and programming: exploring the links

Par Sue Sentance

“In my vision, the child programs the computer and, in doing so, both acquires a sense of mastery over a piece of the most modern and powerful technology and establishes an intimate contact with some of the deepest ideas from science, from mathematics, and from the art of intellectual model building.” – Seymour Papert, Mindstorms: Children, Computers, And Powerful Ideas, 1980

We owe much of what we have learned about children learning to program to Seymour Papert (1928–2016), who not only was a great mathematician and computer scientist, but also an inspirational educationalist. He developed the theoretical approach to learning we now know as constructionism, which purports that learning takes place through building artefacts that have meaning and can be shared with others. Papert, together with others, developed the Logo programming language in 1967 to help children develop concepts in both mathematics and in programming. He believed that programming could give children tangible and concrete experiences to support their acquisition of mathematical concepts. Educational programming languages such as Logo were widely used in both primary and secondary education settings during the 1980s and 90s. Thus for many years the links between mathematics and programming have been evident, and we were very fortunate to be able to explore this topic with our research seminar guest speaker, Professor Dame Celia Hoyles of University College London.

Dame Celia Hoyles

Professor Dame Celia Hoyles

Dame Celia Hoyles is a huge celebrity in the world of mathematical education and programming. As well as authoring literally hundreds of academic papers on mathematics education, including on Logo programming, she has received a number of prestigious awards and honours, and has served as the Chief Advisor to the UK government on mathematics in school. For all these reasons, we were delighted to hear her present at a Raspberry Pi Foundation computing education research seminar.

Mathematics is a subject we all need to understand the basics of — it underpins much of our other learning and empowers us in daily life. Yet some mathematical concepts can seem abstract and teachers have struggled over the years to help children to understand them. Since programming includes the design, building, and debugging of artefacts, it is a great approach for make such abstract concepts come to life. It also enables the development of both computational and mathematical thinking, as Celia described in her talk.

Learning mathematics through Scratch programming

Celia and a team* at University College London developed a curriculum initiative called ScratchMaths to teach carefully selected mathematical concepts through programming (funded by the Education Endowment Foundation in 2014–2018). ScratchMaths is for use in upper primary school (age 9–11) over a two-year period.

In the first year, pupils take three computational thinking modules, and in the second year, they move to three more mathematical thinking modules. All the ScratchMaths materials were designed around a pedagogical framework called the 5Es: explore, envisage, explain, exchange, and bridge. This enables teachers to understand the structure and sequencing of the materials as they use them in the classroom:

  • Explore: Investigate, try things out yourself, debug in reaction to feedback
  • Envisage: Have a goal in mind, predict outcome of program before trying
  • Explain: Explain what you have done, articulate reasons behind your approach to others
  • Exchange: Collaborate & share, try to see a problem from another’s perspective as well as defend your own approach and compare with others
  • bridgE: Make explicit links to the mathematics curriculum

Teachers in the ScratchMaths project participated in professional development (two days per module) to enable them to understand the materials and the pedagogical approach.

At the end of the project, external evaluators measured the childrens’ learning and found a statistically significant increase in computational thinking skills after the first year, but no difference between an intervention group and a control group in the mathematical thinking outcomes in the second year (as measured by the national mathematics tests at that age).

Celia discussed a number of reasons for these findings. She also drew out the positive perspective that children in the trial learned two subjects at the same time without any detriment to their learning of mathematics. Covering two subjects and drawing the links between them without detriment to the core learning is potentially a benefit to schools who need to fit many subjects into their teaching day.

Much more information about the programme and the materials, which are freely available for use, can be found on the ScratchMaths project’s website, and you can also read a research paper describing the project.

As at all our research seminars, participants had many questions for our speaker. Although the project was designed for primary education, where it’s more common to learn subjects together across the curriculum, several questions revolved around the project’s suitability for secondary school. It’s interesting to reflect on how a programme like ScratchMaths might work at secondary level.

Should computing be taught in conjunction or separately?

Teaching programming through mathematics, or vice versa, is established practice in some countries. One example comes from Sweden, where computing and programming is taught across different subject areas, including mathematics: “through teaching pupils should be given opportunities to develop knowledge in using digital tools and programming to explore problems and mathematical concepts, make calculations and to present and interpret data”. In England, conversely, we have a discrete computing curriculum, and an educational system that separates subjects out so that it is often difficult for children to see overlap and contiguity. However, having the focus on computing as a discrete subject gives enormous benefits too, as Celia outlined at the beginning of her talk, and it opens up the potential to give children an in-depth understanding of the whole subject area over their school careers. In an ideal world, perhaps we would teach programming in conjunction with a range of subjects, thus providing the concrete realisation of abstract concepts, while also having discrete computing and computer science in the curriculum.

Woman teacher and female students at a computer

In our current context of a global pandemic, we are continually seeing the importance of computing applications, for example computer modelling and simulation used in the analysis of data. This talk highlighted the importance of learning computing per se, as well as the mathematics one can learn through integrating these two subjects.

Celia is a member of the National Centre of Computing Education (NCCE) Academic Board, made up of academics and experts who support the teaching and learning elements of the NCCE, and we enjoy our continued work with her in this capacity. Through the NCCE, the Raspberry Pi Foundation is reaching thousands of children and educators with free computing resources, online courses, and advanced-level computer science materials. Our networks of Code Clubs and CoderDojos also give children the space and freedom to experiment and play with programming and digital making in a way that is concordant with a constructionist approach.

Next up in our seminar series

If you missed the seminar, you can find Celia’s presentation slides and a recording of her talk on our research seminars page.

In our next seminar on Tuesday 16 June at 17:00–18:00 BST / 12:00–13:00 EDT / 9:00–10:00 PDT / 18:00–19:00 CEST, we’ll welcome Jane Waite, Teaching Fellow at Queen Mary University of London. Jane will be sharing insights about Semantic Waves and unplugged computing. To join the seminar, simply sign up with your name and email address and we’ll email you the link and instructions. If you attended Celia’s seminar, the link remains the same.

 

*The ScratchMaths team are :

  • Professor Dame Celia Hoyles (Mathematics) & Professor Richard Noss (Mathematics) UCL Knowledge Lab
  • Professor Ivan Kalas, (Computing) Comenius University, Bratislava, Slovakia
  • Dr Laura Benton (Computing) & Piers Saunders, (Mathematics) UCL Knowledge Lab
  • Professor Dave Pratt (Mathematics) UCL Institute of Education

The post Mathematics and programming: exploring the links appeared first on Raspberry Pi.

Kaleidoscopic space art made with Raspberry Pi onboard the ISS

Par Ashley Whittaker

What could be the world’s first interactive art experiment in space is powered by Raspberry Pi!

The experiment, named Pulse/Hydra 3, features a kaleidoscope (as seen in the video) that lights up and starts to rotate after it receives heartbeat data from its ground terminal. This artistic experiment is designed to inspire people back on Earth.

Look closely at the video and you should be able to see small beads floating around in microgravity.

During scheduled events at museum and galleries, participants use a specially designed terminal fitted with a pulse oximeter to measure their pulse rate and blood oxygenation level. These measurements are transmitted in real time to the Pulse/Hydra 3 payload on the ISS, which is activated by the transmission.

Inside the payload, there’s a specially designed ‘microgravity kaleidoscope’. The transmitted data activates the kaleidoscope, and the resulting live images are securely streamed back to the ground terminal. The images are then projected onto large video screens so the whole audience can watch what is happening in orbit. The artistic idea is that both pulse rate and blood oxygenation levels are highly transient physiological characteristics that respond rapidly to conscious and sub-conscious emotional states. Therefore, there is a complex interaction between the participant and the payload, as both react to each other during the experience.

We wouldn’t have been able to achieve things like that on dial-up internet.

Where does it live?

Pulse/Hydra 3 is currently installed aboard the International Space Station (ISS) in the ESA Columbus module. The Columbus laboratory is ESA’s biggest single contribution to the ISS. The 4.5 m diameter cylindrical module of 6.9 m in length is equipped with flexible research facilities and provides accommodation for experiments in the field of multidisciplinary research into material science, fluid physics, and life science.

Artist's cut-away view of the Columbus module elements (image credit: ESA)

Artist’s cut-away view of the Columbus module elements (image credit: ESA)

This payload was launched on 29 June 2018 and it will be completing its two years in orbit soon.

More Raspberry Pi experiments in space

Pulse/Hydra 3 is, you guessed it, the third in a series of experiments run on board the Columbus module. The other two are:

  • Hydra-1, a plant growth experiment.
  • Hydra-2, a methanogenesis experiment exploring gravity’s effect on bacteria.

And Hydra-3 is the interactive art payload you’ve just read about. It lives in the same rack that used to house Hydra-1 and -2. All three run on Raspberry Pi!

Hydra-1, Hydra-2, and Hydra-3, all running on Raspberry Pi

These three payloads are of course great companions to our Astro Pi computers, which allow thousands of young people every year to run their code in space!

Place your bets on the year the first Raspberry Pi shop opens on the Moon…

The post Kaleidoscopic space art made with Raspberry Pi onboard the ISS appeared first on Raspberry Pi.

Raspberry Pi-powered wedding memories record player

Par Ashley Whittaker

We’re a sentimental bunch and were bowled over by this intricate, musical wedding gift. It’s powered by a Raspberry Pi and has various other bits of geeky goodness under the hood. Honestly, the extra features just keep coming — you’ll see.

This beautifully crafted ‘record player’ plays one pair of newlyweds’ Spotify accounts, and there’s a special visual twist when their ‘first dance’ wedding song plays.

Midway through the build process

First, a little background: the newlyweds, Holly and Dougie, have been sweethearts since early highschool days. Their wedding took place on a farm near the village they grew up in, Fintry in rural Scotland.

3 yrs ago my little sister got married. The phrase "Music is a huge deal" was used a LOT in the lead up to the wedding, so I built them a magic record player that links with their @Spotify accounts, using a @Raspberry_Pi , spare timber and a bit of imagination. #throwbackproject pic.twitter.com/0CfYqPVH67

— Ben Howell (@piffleandwhimsy) May 22, 2020

Throughout the wedding day, the phrase “Music is a huge deal” was repeated often, which gave the bride’s older brother Ben Howell the idea for a homemade, Raspberry Pi–powered gift.

Custom tagline laser-cut and spray-painted

He built the couple a neatly finished music box, known as HD-001 (HD for ‘Holly Dougie’ of course) and home to a ‘smart turntable’. It can connect to a wireless network and has a touch screen where the record label would normally sit. When you lift the lid and switch it on, it asks “Hello. Who’s listening?”

Once you tap on the picture of either the bride or groom, it accesses their Spotify account and fetches the album artwork of whatever song it plays.

What’s inside?

The main brain is Raspberry Pi 3 running Raspberry Pi OS. The interface is built as a web page in mostly PHP and JavaScript. It uses the Spotify API to get the ‘now playing’ track of the bride’s or groom’s account, and to fish out the album artwork URL from the return data so it can display this on a rotating panel.

The audio side is a powered by a 50W Bluetooth amplifier, which is entirely independent from the Raspberry Pi computer.

The build details

The enclosure is all custom-designed and built using scrap wood wrapped in green faux leather material. Ben sourced most of the other materials — rubber feet, hinges, switches, metal grille — on Amazon.

The HD-001 also features a hand-built 4-way speaker system and a custom-made speaker grille with that famous phrase “Music is a huge deal” on the front.

The lettering on the grille was laser-cut by a company in Glasgow to order, and Ben spray-painted it metallic grey. The LCD panel and driver board are also from Amazon.

To play and pause music, Ben sourced a tone-arm online and routed cabling from the Raspberry Pi GPIO pins through to a micro-switch where the original needle should sit. That’s how lifting the arm pauses playback, and replacing it resumes the music.

Getting the audio to work

Ben explains: “Essentially, it’s a fancy Bluetooth speaker system disguised as an old-fashioned turntable and designed to behave and work like an old-fashioned turntable (skeuomorphism gone mad!).”

Oh, and our favourite adorable bonus feature? If the first dance song from Holly’s and Dougie’s wedding is played, the album artwork on the LCD panel fades away, to be replaced by a slideshow of photos from their wedding.

We have it on good authority that Ben will entertain anyone who would like to place a pre-order for the HD-002.

The post Raspberry Pi-powered wedding memories record player appeared first on Raspberry Pi.

Vulkan update: now with added source code

Par Eben Upton

Today we have a guest post from Igalia’s Iago Toral, who has spent the past year working on the Mesa graphic driver stack for Raspberry Pi 4.

It is almost five months since we announced the Vulkan effort for Raspberry Pi 4. It was great to see how many people were excited about this, and today we would like to give you a status update on our progress over these last months.

When we announced the effort back in January we were at the point of rendering a coloured triangle, which required only minimal coverage of the Vulkan 1.0 API in the driver. Today, we are passing over 70,000 tests from the Khronos Conformance Test Suite for Vulkan 1.0 and we have an implementation for a significant subset of the Vulkan 1.0 API.

Progress so far, in pictures

While I could detail here all the features that we have implemented, I am sure that list would get long and boring very quickly for most of you. So, instead, we would like to show you our progress through pics taken from a bunch of the popular Vulkan demos by Sascha Willems running on Raspberry Pi 4:

Hopefully that is more entertaining than a feature checklist and will help you visualize better where we are now compared to January’s coloured triangle.

Before you get too excited though, while these demos are nice, they are still a far cry from actual games and applications. We still have a lot of work to do before the driver can handle these more complex workloads. Even some of Sascha’s demos don’t run yet, whether because of driver bugs or unimplemented Vulkan features. We still have a lot of work ahead of us.

Next up

I would also like to give you an overview of some of the things we will be working on in the coming months:

Our first priority is to support the basic Vulkan 1.0 feature set. This will involve, at least, supporting compute shaders, input attachments, texel buffers, storage images, pipeline caches, and multisampling. There are some other features that we need to support in Vulkan 1.0, such as robust buffer access etc, but those are probably the largest ones we are currently missing.

Once we are feature-complete we will probably move focus to CTS conformance, which will be all about bugfixing, and making sure we handle spec corner cases. And once we are close to conformance, the driver should hopefully be stable and robust enough that we should probably start testing actual Vulkan applications and games to drive further bugfixing work.

Finally, there will be a lot of performance tuning and optimization work that we will probably tackle in the last stages of development.

So as I said before, we still have a long way to go!

Moving development to an open repository

Before we end this post, I would also like to share another important piece of news: starting today, we are moving development of the driver to an open repository. You can find instructions on how to build and install the driver here. I know this is something that many of you have been asking for, and I am sorry that it took us a few months to get here. But I think that now that we have a more stable driver infrastructure in place, and we don’t feel like we are constantly making large changes every other day, development should be a lot friendlier to external contributors than it may have been a few months ago.

So that’s everything we wanted to share today – I hope you are still excited about Vulkan and looking forward to future updates. In the meantime, if you have questions or are interested in contributing to the driver, join us on irc.freenode.net, #videocore channel.

The post Vulkan update: now with added source code appeared first on Raspberry Pi.

What are the effects of the pandemic on education? | Hello World #13

Par Philip Colligan

How has computing education changed over the last few months? And how will the coronavirus pandemic affect education in the long term? In the introduction to our newest issue of Hello World, our CEO Philip Colligan reflects on the incredible work of front-line educators, and on the challenges educators and students will face.

Hello World issue 13 front cover

In just a few short weeks, the coronavirus pandemic has had a profound impact on every aspect of life, not least education. With 1.2 billion young people affected by the closure of schools, teachers have joined health and care workers, and the many others, who are on the front line of the fight against the virus.

As chair of governors at a state school here in Cambridge, I’ve seen first-hand the immense pressure that schools and teachers are under. The abrupt transition to emergency remote teaching, caring for the most vulnerable students, supporting families who are experiencing the health and economic devastation wrought by the virus, and doing all of this while looking after themselves and their loved ones. The word ‘heroic’ doesn’t feel nearly sufficient to describe the efforts of teachers all over the world.

At the Raspberry Pi Foundation, we wanted to learn about how different schools have responded, what’s working, what the challenges are, and crucially, what is happening to computing education. We spoke to teachers at primary schools, secondary schools, and further education colleges. Most were based in the UK, with a few in India and the US.

Even from this small collection of interviews, we saw incredible innovation and resilience, coupled with a determination to ensure that all young people could continue learning during the lockdown.

Most of the teachers that we spoke to were specialists in computing. Their expertise with technology has put them centre-stage, with many stepping into leadership roles, supporting the rapid roll-out of online learning, and providing invaluable support to colleagues and students alike. We hope that this leads to schools giving greater priority to computing education. Digital technologies are keeping the world connected and working. Equipping all young people with the ability to harness the power of computing has never been more vital.

We’ve also seen profound challenges. The digital divide has never been more apparent. Far too many young people lack access to a computer for learning at home. This is a problem that can be fixed at a cost that is trivial compared to the long-term economic impact of the educational disadvantage that it causes.

But we’re also hearing first-hand how educational disadvantage isn’t just about access to technology. Many families are struggling to support home learning, whether because of the condition of their housing, their work or caring responsibilities, or the struggle to put food on the table. Teachers have responded compassionately, offering practical support where it’s needed most, and planning now for how they will help students catch up when schools reopen.

We know that school closures disproportionately impact the most disadvantaged students. If we are going to reduce the long-term economic and social impact of the virus, there needs to be a huge global effort to invest in addressing the educational impact that it has caused.

As we start to figure out what a post-lockdown world might look like, the only thing that feels certain is we are facing a long period of disruption to formal education. We need to find new ways to combine online learning, classroom and remote teaching, mentoring, and non-formal learning experiences, to ensure that all young people, whatever their backgrounds, are able to thrive and fulfil their potential. The stories we’ve heard from these educators give me hope that we can, but they will need the support of government, industry, and nonprofits. The Raspberry Pi Foundation is committed to playing our part.

Get your free copy today!

Besides the Learning in lockdown feature, issue 13 of Hello World contains articles and opinion pieces on managing screen time, safeguarding in online lessons, and how the education landscape is shifting at an unprecedented rate.

We’ve also collected together some of the best free resources for online learning, and we share fantastic activities in our resources section.

Download your free copy to read about all this and more!

And if you’re an educator in the UK, you can take out a free subscription to receive print copies of Hello World.

The post What are the effects of the pandemic on education? | Hello World #13 appeared first on Raspberry Pi.

Let’s go out to sea with Digital Making at Home

Par Kevin Johnson

Digital Making at Home: Out at sea

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 Raspbe…

Join us for Digital Making at Home, where this week for World Oceans Day, the big blue sea is calling our names. With Digital Making at Home, we invite young people all over the world to code along with us and our new videos every week to keep the coding fun going at home!

There’s a whole world to discover under the sea, so let’s use the power of digital making to dive in together, code-first:

Check out this week’s code-along videos!

And tune in on Wednesday at 2pm BST / 9am EDT / 7.30pm IST at rpf.io/home to code along with our live stream session.

The post Let’s go out to sea with Digital Making at Home appeared first on Raspberry Pi.

Raspberry Pi–powered robot farmers

Par Ashley Whittaker

We love seeing Raspberry Pi being used to push industry forward. Here’s an example of how our tiny computers are making an impact in agriculture. 

Directed Machines is a small company on a mission to remove pollution and minimise human labour in land care. Their focus is to do more with less, so the affordable power of our robust computers matches perfectly with their goals.

You’ll find a Raspberry Pi 4 at the heart of their solar-powered, autonomous, electric tractors called Land Care Robots.

Here are a few of the robot’s specs:

  • 30KW / 42HP peak power
  • 1400 ft.lb torque
  • 400W bi-facial, high-efficiency solar panel for 10KWh energy storage
  • 50″(W)×80″(L) with zero turn
  • Dual color and depth (distance measuring) cameras, accelerometer, magnetic compass, and GPS
  • 4G/3G/2G modem for self-update/telemetry publish/map downloads and WiFi, allowing direct control from smartphone or PC
  • Multiple autonomy modes, area coverage, and way-point navigation
  • Follow mode, person or peer robot, using wearable tag, depth sensors and motion control using smartphone touch/tilt, combined with obstacle avoidance

Directed Machine’s COO Wayne Pearson explains: “Rather than opting for the most advanced components (often the simplest solution), we endeavour to find affordable, easily sourced components. We then enable these components to accomplish more by ensuring efficient uses of compute/memory resources through our software stack, which we built from the ground up.”

“All in all,” Wayne continues, “this approach helps minimise unnecessarily inflated component costs (as well as the corresponding complexities) from being passed along to our customers — which keeps our prices lower and enables rapid field repair/maintenance.”

Here’s a practical example of that. This is a custom HAT Directed Machine’s ‘Electrical Engineering Guy’ Chris Doughty shared on LinkedIn. It was specially created to expand the functionality of the Raspberry Pi 4s they were using:

The HAT includes:

• 7-port USB 2.0 hub (six ports off-board) with individual port-power control
• 5A of 5.45V power to keep Pi running stable with high-current peripherals
• 9-axis IMU LSM9DS1
• Precision ‘M8P’ UBLOX GNSS receiver (capable of supporting RTK) SMA connection for external GPS antenna including DC for LNA
• 7–15V DC input to support automotive and accessory-port applications • Connects to standard Raspberry Pi 3 and 4 via pin-header and standoffs

Directed Machine’s founder George Chrysanthakopoulos shared the video at the top of this post on LinkedIn to demonstrate how the land care robots see the world while autonomously navigating. The combined power of Raspberry Pi 4 and their own built-from-the-ground software stack lets the robots see dual depth and colour streams at 15Hz. This is all made possible with a cheap GPS plus an Inertial Measurement Unit (IMU) for just $15 combined.


With a base price of the Land Care Robot is in the thousands, we’re not suggesting you should pick up one for your back garden — cutting the lawn is a childhood chore for the ages. But, for industry, the robot is a fine example of how businesses are using Raspberry Pi to cut both cost and environmental impact.

Also see Liz’s favourite project, the Cucumber Counter, and the popular CNC FarmBot, for more examples of ‘Down on the farm with Raspberry Pi’.

The post Raspberry Pi–powered robot farmers appeared first on Raspberry Pi.

Code Gauntlet’s four-player co-op mode | Wireframe #39

Par Ryan Lambie

Four players dungeon crawling at once? Mark Vanstone shows you how to recreate Gauntlet’s co-op mode in Python and Pygame Zero.

Players collected items while battling their way through dungeons. Shooting food was a definite faux pas.

Atari’s Gauntlet was an eye-catching game, not least because it allowed four people to explore its dungeons together. Each player could choose one of four characters, each with its own abilities – there was a warrior, a Valkyrie, a wizard, and an elf – and surviving each dungeon required slaughtering enemies and the constant gathering of food, potions, and keys that unlocked doors and exits.

Designed by Ed Logg, and loosely based on the tabletop RPG Dungeons & Dragons, as well as John Palevich’s 1983 dungeon crawler, Dandy, Gauntlet was a big success. It was ported to most of the popular home systems at the time, and Atari released a sequel arcade machine, Gauntlet II, in 1986.

Atari’s original arcade machine featured four joysticks, but our example will mix keyboard controls and gamepad inputs. Before we deal with the movement, we’ll need some characters and dungeon graphics. For this example, we can make our dungeon from a large bitmap image and use a collision map to prevent our characters from clipping through walls. We’ll also need graphics for the characters moving in eight different directions. Each direction has three frames of walking animation, which makes a total of 24 frames per character. We can use a Pygame Zero Actor object for each character and add a few extra properties to keep track of direction and the current animation frame. If we put the character Actors in a list, we can loop through the list to check for collisions, move the player, or draw them to the screen.

We now test input devices for movement controls using the built-in Pygame keyboard object to test if keys are pressed. For example, keyboard.left will return True if the left arrow key is being held down. We can use the arrow keys for one player and the WASD keys for the other keyboard player. If we register x and y movements separately, then if two keys are pressed – for example, up and left – we can read that as a diagonal movement. In this way, we can get all eight directions of movement from just four keys.

For joystick or gamepad movement, we need to import the joystick module from Pygame. This provides us with methods to count the number of joystick or gamepad devices that are attached to the computer, and then initialise them for input. When we check for input from these devices, we just need to get the x-axis value and the y- axis value and then make it into an integer. Joysticks and gamepads should return a number between -1 and 1 on each axis, so if we round that number, we will get the movement value we need.

We can work out the direction (and the image we need to use) of the character with a small lookup table of x and y values and translate that to a frame number cycling through those three frames of animation as the character walks. Then all we need to do before we move the character is check they aren’t going to collide with a wall or another character. And that’s it – we now have a four-player control system. As for adding enemy spawners, loot, and keys – well, that’s a subject for another time.

Here’s Mark’s code snippet. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code and assets, go here.

Get your copy of Wireframe issue 39

You can read more features like this one in Wireframe issue 39, available directly from Raspberry Pi Press — we deliver worldwide.

And if you’d like a handy digital version of the magazine, you can also download issue 39 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 Gauntlet’s four-player co-op mode | Wireframe #39 appeared first on Raspberry Pi.

Learn at home #3: building resilience and problem solving skills

Par Katie Gouskos

With changes to school and work around the world, many parents and carers still aren’t sure what to expect over the next few weeks. While some children have returned to school, we know that many young people and families are still learning and working at home. We’re providing lots of free extra resources for young people, and we’re offering free support tutorials for parents who want to help their children understand more about the tools they’ll be using on their coding journey.

a kid doing digital making at home

In our last blog post for parents, we talked to you about Python, which is a widely used text-based programming language, and about Trinket, a free online platform that lets you write and run your code in any web browser.

This week we talk about the importance of resilience and problem solving as we cover debugging — finding and fixing errors in your code.

Debugging explained

When your child embarks on a coding project, expect to hear the phrase “It’s not working!” often. It’s really important to recognise that their code might not work on the first (or fourth) go, and that that’s completely OK. Debugging is a key process for young people who are learning how to code, and it helps them to develop resilience and problem solving skills.

Learning Manager Mac shows you tips and tricks for fixing Python code errors to help you build more confidence while you support your children at home.

Fixing errors in Python code

In this video, Learning Manager Mac will show you some tips and tricks for fixing Python code errors (also known as ‘debugging’) to help you build more confi…

Mac’s top tips for debugging

1. Check the instructions

If your child is following one of our online coding projects, the instructions are usually very detailed and precise. Encourage your child to read through the instructions thoroughly and see if they can spot a difference between their code and what’s in the instructions. You should find that many errors can be fixed by doing this!

2. Try, try and try again

Coding is iterative: programs are written in stages, with debugging during every stage. Errors in code are normal and very common, so mistakes in your child’s programs are to be expected. As a young person begins to develop coding skills, they start learning to problem-solve and persevere despite the errors, which will help them both on and off the computer. And the more they code, the quicker they’ll become at spotting and fixing errors.

Two kids doing digital making at home

3. Small changes make a big difference

Most of the coding problems your child will come across will be due to tiny mistakes, e.g. one letter or a piece of punctuation that needs changing. So during debugging, it’s helpful for both you and your child to frame the problem in this way: “It’s just one small thing, you are so close.” This helps them build resilience and perseverance, because finding one small error is much more achievable than thinking that the whole program is broken and they need to start over.

4. Say it out loud

When your child encounters a problem with their code, encourage them to talk you through their whole problem, without interrupting them or making suggestions. Programmers call this technique ‘rubber duck debugging’: when they encounter a problem with their code, they explain everything their code does to an inanimate object — such as a rubber duck! — to find the detail that’s causing the problem. For your child, you can play the part of the rubber duck and provide a supportive, listening ear!

Join in with Digital Making at Home

To keep young people entertained and learning, we’re running a Digital Making at Home series, which is free and accessible to everyone. New code-along videos are released every Monday, with different themes and projects for all levels of experience. We also stream live code-along sessions on Wednesdays at 14:00 BST at rpf.io/home!

a teenager doing digital making at home

Parent diary: Adapting to life online

Ben Garside is a Learning Manager at the Raspberry Pi Foundation and also a dad to three children aged between 6 and 8. Ben is currently homeschooling and working (and still smiling lots!). In this video, Ben shares his personal experience of trying to find the best way of making this work for his family, with a bit of trial and error and lots of flexibility.

Parent diary: Adapting to life online

Ben Garside is a Learning Manager at the Raspberry Pi Foundation and also a dad to three children aged between 6 and 8. Ben is currently homeschooling and wo…

Free online course: Getting Started with Your Raspberry Pi

You’ve got a Raspberry Pi computer at home and aren’t sure how to use it? Then why not sign up to our new free online course to find out all about how to set up your Raspberry Pi, and how to use it for everyday tasks or for learning to code!

Do you have feedback for us?

We’ve been asking parents what they’d like to see as part of our initiative to support young people and parents. We’ve had some great suggestions so far! If you’d like to share your thoughts, email us at parents@raspberrypi.org.

Sign up for our bi-weekly emails, tailored to your needs

Sign up now to start receiving free activities suitable to your child’s age and experience level straight to your inbox. And let us know what you as a parent or guardian need help with, and what you’d like more or less of from us.

 

PS All of our resources are completely free. This is made possible thanks to the generous donations of individuals and organisations. Learn how you can help too!

The post Learn at home #3: building resilience and problem solving skills appeared first on Raspberry Pi.

6558 programs from young people have run on the ISS for Astro Pi 2019/20!

Par Claire Given

The team at the Raspberry Pi Foundation, in collaboration with ESA Education, is excited to announce that all of this year’s successful Astro Pi programs have now run aboard the International Space Station (ISS)!

Record numbers of young people took part in Astro Pi Mission Zero

This year, a record 6350 teams of students and young people from all 25 eligible countries successfully entered Mission Zero, and they had their programs run on the Astro Pi computers on board the ISS for 30 seconds each!

ESA astronaut Chris Cassidy with an Astro Pi computer aboard the ISS

Astronaut Chris Cassidy overseeing the Mission Zero experiments

The Mission Zero teams measured the temperature inside the ISS Columbus module, and used the Astro Pi LED matrix to display the measurement together with a greeting to the astronauts, including Chris Cassidy, who oversaw this year’s experiments.

Mission Space Lab: Investigating life in space and on Earth

In addition, 208 teams of students and young people are currently in the final phase of Astro Pi Mission Space Lab. Over the last few weeks, each of these teams has had their scientific experiment run on either Astro Pi Ed or Astro Pi Izzy for 3 hours each.

Photograph of Earth, taken by Astro Pi computer Izzy

Astro Pi Izzy’s view of Earth

Teams interested in  life on Earth used Astro Pi Izzy’s near-infrared camera to capture images to investigate, for example, vegetation health and the impact of human life on our planet. Using Astro Pi Ed’s sensors, participants investigated life in space, measuring the conditions on the ISS and even mapping the magnetic field of Earth.

Program deployment, but not as we know it

This year, we encountered a problem during the deployment of some experiments investigating life on Earth. When we downloaded the first batch of data from the ISS, we realised that Astro Pi Izzy had an incorrect setting, which resulted in some pictures turning pink. And not only that: the CANADARM was the middle of Izzy’s window view!

The CANADARM from Astro Pi Izzy’s view of Earth

The CANADARM from Astro Pi Izzy’s view of Earth

Needless to say, this would have had a negative impact on many experiments, so we put in a special request to NASA to remove the CANADARM arm and we reset Izzy. This meant that program deployment took longer than normal, but we managed to re-run all experiments and capture some fantastic images!

All Mission Space Lab teams have now received their data back from the ISS to analyse and summarise in their final scientific reports. So that they can write their reports while social distancing measures are in place, we are sharing special guidance and advice on how best to collaborate remotely, and have extended the submission deadline to 3 July 2020.

Who will win Mission Space Lab 2019/20?

The programs teams sent us this year were outstanding in their quality, creativity, and technical skill. A jury of experts appointed by ESA and the Raspberry Pi Foundation will judge all of the Mission Space Lab reports and select the 10 teams with the best reports as the winners of the European Astro Pi Challenge 2019/20. Each of the 10 winning teams will receive a special prize.

Astro Pi Mission Space Lab logo

Congratulations to all the teams that have taken part in Astro Pi Mission Space Lab this year. We hope that you found it as interesting and as fun as we did, we can’t wait to read your reports!

Celebrating your achievements

Every team that participated in Mission Zero or Mission Space Lab this year will receive a special certificate in celebration of their achievements during the European Astro Pi Challenge. The Mission Zero certificates will feature the coordinates of the ISS when your programs were run!

We’d love to see pictures of your certificates hanging in your homes, schools, or clubs, so tag us in your tweets with @astro_pi!

The post 6558 programs from young people have run on the ISS for Astro Pi 2019/20! appeared first on Raspberry Pi.

Monitoring bees with a Raspberry Pi and BeeMonitor

Par Rosie Hattersley

Keeping an eye on bee life cycles is a brilliant example of how Raspberry Pi sensors help us understand the world around us.

The setup featuring an Arduino, RF receiver, USB cable and Raspberry Pi

Getting to design and build things for a living sounds like a dream job, especially if it also involves Raspberry Pi and wildlife. Glyn Hudson has always enjoyed making things and set up a company manufacturing open-source energy monitoring tools shortly after graduating from university. With access to several hives at his keen apiarist parents’ garden in Snowdonia, Glyn set up BeeMonitor using some of the tools he used at work to track the beehives’ inhabitants.

Glyn bent down infront of a hive checking the original BeeMonitor setup

Glyn checking the original BeeMonitor setup

“The aim of the project was to put together a system to monitor the health of a bee colony by monitoring the temperature and humidity inside and outside the hive over multiple years,” explains Glyn. “Bees need all the help and love they can get at the moment and without them pollinating our plants, weíd struggle to grow crops. They maintain a 34∞C core brood temperature (± 0.5∞C) even when the ambient temperature drops below freezing. Maintaining this temperature when a brood is present is a key indicator of colony health.”

Wi-Fi not spot

BeeMonitor has been tracking the hives’ population since 2012 and is one of the earliest examples of a Raspberry Pi project. Glyn built most of the parts for BeeMonitor himself. Open-source software developed for the OpenEnergyMonitor project provides a data-logging and graphing platform that can be viewed online.

Spectators in protective suits watching staff monitor the beehive

BeeMonitor complete with solar panel to power it. The Snowdonia bees produce 12 to 15 kg of honey per year

The hives were too far from the house for WiFi to reach, so Glyn used a low-power RF sensor connected to an Arduino which was placed inside the hive to take readings. These were received by a Raspberry Pi connected to the internet.

Diagram showing what information BeeMonitor is trying to establish

Diagram showing what information BeeMonitor is trying to establish

At first, there was both a DS18B20 temperature sensor and a DHT22 humidity sensor inside the beehive, along with the Arduino (setup info can be found here). Data from these was saved to an SD card, the obvious drawback being that this didn’t display real-time data readings. In his initial setup, Glyn also had to extract and analyse the CSV data himself. “This was very time-consuming but did result in some interesting data,” he says.

Sensor-y overload

Almost as soon as BeeMonitor was running successfully, Glyn realised he wanted to make the data live on the internet. This would enable him to view live beehive data from anywhere and also allow other people to engage in the data.

“This is when Raspberry Pi came into its own,” he says. He also decided to drop the DHT22 humidity sensor. “It used a lot of power and the bees didn’t like it – they kept covering the sensor in wax! Oddly, the bees don’t seem to mind the DS218B20 temperature sensor, presumably since it’s a round metal object compared to the plastic grille of the DHT22,” notes Glyn.

Bees interacting with the temperature probe

Unlike the humidity sensor, the bees don’t seem to mind the temperature probe

The system has been running for eight years with minimal intervention and is powered by an old car battery and a small solar PV panel. Running costs are negligible: “Raspberry Pi is perfect for getting projects like this up and running quickly and reliably using very little power,” says Glyn. He chose it because of the community behind the hardware. “That was one of Raspberry Pi’s greatest assets and what attracted me to the platform, as well as the competitive price point!” The whole setup cost him about £50.

Glyn tells us we could set up a basic monitor using Raspberry Pi, a DS28B20 temperature sensor, a battery pack, and a solar panel.

The post Monitoring bees with a Raspberry Pi and BeeMonitor appeared first on Raspberry Pi.

Let’s make digital art at home this week

Par Kevin Johnson

Digital Making at Home: Make art

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 Raspbe…

Digital Making at Home is our initiative to encourage young people to code along with us in their homes across the world. We support them with weekly themed content, code-along videos, live streams, and more!

For our newest theme, we explore making digital art. Many young makers are no stranger to making art, especially the digital kind! That’s why this week, we’re inviting them to bring their most colourful and imaginative ideas to life using code.

So this week for Digital Making at Home, let’s make some art!

The post Let’s make digital art at home this week appeared first on Raspberry Pi.

Latest Raspberry Pi OS update – May 2020

Par Simon Long

Along with yesterday’s launch of the new 8GB Raspberry Pi 4, we launched a beta 64-bit ARM version of Debian with the Raspberry Pi Desktop, so you could use all those extra gigabytes. We also updated the 32-bit version of Raspberry Pi OS (the new name for Raspbian), so here’s a quick run-through of what has changed.

NEW Raspberry Pi OS update (May 2020)

An update to the Raspberry Pi Desktop for all our operating system images is also out today, and we’ll have more on that in tomorrow’s blog post. For now, fi…

Bookshelf

As many of you know, we have our own publishing company, Raspberry Pi Press, who publish a variety of magazines each month, including The MagPi, HackSpace magazine, and Wireframe. They also publish a wide range of other books and magazines, which are released either to purchase as a physical product (from their website) or as free PDF downloads.

To make all this content more visible and easy to access, we’ve added a new Bookshelf application – you’ll find it in the Help section of the main menu.

Bookshelf shows the entire current catalogue of free magazines – The MagPi, HackSpace magazine and Wireframe, all with a complete set of back issues – and also all the free books from Raspberry Pi Press. When you run the application, it automatically updates the catalogue and shows any new titles which have been released since you last ran it with a little “new” flash in the corner of the cover.

To read any title, just double-click on it – if it is already on your Raspberry Pi, it will open in Chromium (which, it turns out, is quite a good PDF viewer); if it isn’t, it will download and then open automatically when the download completes. You can see at a glance which titles are downloaded and which are not by the “cloud” icon on the cover of any file which has not been downloaded.

All the PDF files you download are saved in the “Bookshelf” directory in your home directory, so you can also access the files directly from there.

There’s a lot of excellent content produced by Raspberry Pi Press – we hope this makes it easier to find and read.

Edit – some people have reported that Bookshelf incorrectly gives a “disk full” error when running on a system in which the language is not English; a fix for that is being uploaded to apt at the moment, so updating from apt (“sudo apt update” followed by “sudo apt upgrade”) should get the fixed version.

Magnifier

As mentioned in my last blog post (here), one of the areas we are currently trying to improve is accessibility to the Desktop for people with visual impairments. We’ve already added the Orca screen reader (which has had a few bug fixes since the last release which should make it work more reliably in this image), and the second recommendation we had from AbilityNet was to add a screen magnifier.

This proved to be harder than it should have been! I tried a lot of the existing screen magnifier programs that were available for Debian desktops, but none of them really worked that well; I couldn’t find one that worked the way the magnifiers in the likes of MacOS and Ubuntu did, so I ended up writing one (almost) from scratch.

To install it, launch Recommended Applications in the new image and select Magnifier under Universal Access. Once it has installed, reboot.

You’ll see a magnifying glass icon at the right-hand end of the taskbar – to enable the magnifier, click this icon, or use the keyboard shortcut Ctrl-Alt-M. (To turn the magnifier off, just click the icon again or use the same keyboard shortcut.)

Right-clicking the magnifier icon brings up the magnifier options. You can choose a circular or rectangular window of whatever size you want, and choose by how much you want to zoom the image. The magnifier window can either follow the mouse pointer, or be a static window on the screen. (To move the static window, just drag it with the mouse.)

Also, in some applications, you can have the magnifier automatically follow the text cursor, or the button focus. Unfortunately, this depends on the application supporting the required accessibility toolkit, which not all applications do, but it works reasonably well in most included applications. One notable exception is Chromium, which is adding accessibility toolkit support in a future release; for now, if you want a web browser which supports the accessibility features, we recommend Firefox, which can be installed by entering the following into a terminal window:

sudo apt install firefox-esr

(Please note that we do not recommend using Firefox on Raspberry Pi OS unless you need accessibility features, as, unlike Chromium, it is not able to use the Raspberry Pi’s hardware to accelerate video playback.)

I don’t have a visual impairment, but I find the magnifier pretty useful in general for looking at the finer details of icons and the like, so I recommend installing it and having a go yourself.

User research

We already know a lot of the things that people are using Raspberry Pi for, but we’ve recently been wondering if we’re missing anything… So we’re now including a short optional questionnaire to ask you, the users, for feedback on what you are doing with your Raspberry Pi in order to make sure we are providing the right support for what people are actually doing.

This questionnaire will automatically be shown the first time you launch the Chromium browser on a new image. There are only four questions, so it won’t take long to complete, and the results are sent to a Google Form which collates the results.

You’ll notice at the bottom of the questionnaire there is a field which is automatically filled in with a long string of letters and numbers. This is a serial number which is generated from the hardware in your particular Raspberry Pi which means we can filter out multiple responses from the same device (if you install a new image at some point in future, for example). It does not allow us to identify anything about you or your Raspberry Pi, but if you are concerned, you can delete the string before submitting the form.

As above, this questionnaire is entirely optional – if you don’t want to fill it in, just close Chromium and re-open it and you won’t see it again – but it would be very helpful for future product development if we can get this information, so we’d really appreciate it if as many people as possible would fill it in.

Other changes

There is also the usual set of bug fixes and small tweaks included in the image, full details of which can be found in the release notes on the download page.

One particular change which it is worth pointing out is that we have made a small change to audio. Raspberry Pi OS uses what is known as ALSA (Advanced Linux Sound Architecture) to control audio devices. Up until now, both the internal audio outputs on Raspberry Pi – the HDMI socket and the headphone jack – have been treated as a single ALSA device, with a Raspberry Pi-specific command used to choose which is active. Going forward, we are treating each output as a separate ALSA device; this makes managing audio from the two HDMI sockets on Raspberry Pi 4 easier and should be more compatible with third-party software. What this means is that after installing the updated image, you may need to use the audio output selector (right-click the volume icon on the taskbar) to re-select your audio output. (There is a known issue with Sonic Pi, which will only use the HDMI output however the selector is set – we’re looking at getting this fixed in a future release.)

Some people have asked how they can switch the audio output from the command line without using the desktop. To do this, you will need to create a file called .asoundrc in your home directory; ALSA looks for this file to determine which audio device it should use by default. If the file does not exist, ALSA uses “card 0” – which is HDMI – as the output device. If you want to set the headphone jack as the default output, create the .asoundrc file with the following contents:

defaults.pcm.card 1
defaults.ctl.card 1

This tells ALSA that “card 1” – the headphone jack – is the default device. To switch back to the HDMI output, either change the ‘1’s in the file to ‘0’s, or just delete the file.

How do I get it?

The new image is available for download from the usual place: our Downloads page.

To update an existing image, use the usual terminal command:

sudo apt update
sudo apt full-upgrade

To just install the bookshelf app:

sudo apt update
sudo apt install rp-bookshelf

To just install the magnifier, either find it under Universal Access in Recommended Software, or:

sudo apt update
sudo apt install mage

You’ll need to add the magnifier plugin to the taskbar after installing the program itself. Once you’ve installed the program and rebooted, right-click the taskbar and choose Add/Remove Panel Items; click Add, and select the Magnifier option.

We hope you like the changes — as ever, all feedback is welcome, so please leave a comment below!

The post Latest Raspberry Pi OS update – May 2020 appeared first on Raspberry Pi.

8GB Raspberry Pi 4 on sale now at $75

Par Eben Upton

The long-rumoured 8GB Raspberry Pi 4 is now available, priced at just $75.

Raspberry Pi 4 is almost a year old, and it’s been a busy year. We’ve sold nearly 3 million units, shipped a couple of minor board revisions, and reduced the price of the 2GB variant from $45 to $35. On the software side, we’ve done enormous amounts of work to reduce the idle and loaded power consumption of the device, passed OpenGL ES 3.1 conformance, started work on a Vulkan driver, and shipped PXE network boot mode and a prototype of USB mass storage boot mode – all this alongside the usual round of bug fixes, feature additions, and kernel version bumps.

While we launched with 1GB, 2GB and 4GB variants, even at that point we had our eye on the possibility of an 8GB Raspberry Pi 4. We were so enthusiastic about the idea that the non-existent product made its way into both the Beginner’s Guide and the compliance leaflet.

Oops.

The BCM2711 chip that we use on Raspberry Pi 4 can address up to 16GB of LPDDR4 SDRAM, so the real barrier to our offering a larger-memory variant was the lack of an 8GB LPDDR4 package. These didn’t exist (at least in a form that we could address) in 2019, but happily our partners at Micron stepped up earlier this year with a suitable part. And so, today, we’re delighted to announce the immediate availability of the 8GB Raspberry Pi 4, priced at just $75.

Multum in parvo

It’s worth reflecting for a moment on what a vast quantity of memory 8GB really is. To put it in retro-perspective (retrospective?), this is a BBC Micro‘s worth of memory for every bit in the memory of the BBC Micro; it’s a little over 13,000 times the 640KB that Bill Gates supposedly thought should be enough for anyone (sadly, it looks as though this quote is apocryphal).

If you’re a power user, intending to compile and link large pieces of software or run heavy server workloads, or you simply want to be able to have even more browser tabs open at once, this is definitely the Raspberry Pi for you.

What else has changed?

To supply the slightly higher peak currents required by the new memory package, James has shuffled the power supply components on the board, removing a switch-mode power supply from the right-hand side of the board next to the USB 2.0 sockets and adding a new switcher next to the USB-C power connnector. While this was a necessary change, it ended up costing us a three-month slip, as COVID-19 disrupted the supply of inductors from the Far East.

New switcher, new inductors, new schedule

Other than that, this is the same Raspberry Pi 4 you’ve come to know and love.

What about 64-bit?

Our default operating system image uses a 32-bit LPAE kernel and a 32-bit userland. This allows multiple processes to share all 8GB of memory, subject to the restriction that no single process can use more than 3GB. For most users this isn’t a serious restriction, particularly since every tab in Chromium gets its own process. Sticking with a 32-bit userland has the benefit that the same image will run on every board from a 2011-era alpha board to today’s shiny new 8GB product.

But power users, who want to be able to map all 8GB into the address space of a single process, need a 64-bit userland. There are plenty of options already out there, including Ubuntu and Gentoo.

Not to be left out, today we’ve released an early beta of our own 64-bit operating system image. This contains the same set of applications and the same desktop environment that you’ll find in our regular 32-bit image, but built against the Debian arm64 port.

Both our 32-bit and 64-bit operating system images have a new name: Raspberry Pi OS. As our community grows, we want to make sure it’s as easy as possible for new users to find our recommended operating system for Raspberry Pi. We think the new name will help more people feel confident in using our computers and our software. An update to the Raspberry Pi Desktop for all our operating system images is also out today, and we’ll have more on that in tomorrow’s blog post.

You can find a link to the new 64-bit image, and some important caveats, in this forum post.

The post 8GB Raspberry Pi 4 on sale now at $75 appeared first on Raspberry Pi.

Learning AI at school — a peek into the black box

Par Sue Sentance

“In the near future, perhaps sooner than we think, virtually everyone will need a basic understanding of the technologies that underpin machine learning and artificial intelligence.” — from the 2018 Informatics Europe & EUACM report about machine learning

As the quote above highlights, AI and machine learning (ML) are increasingly affecting society and will continue to change the landscape of work and leisure — with a huge impact on young people in the early stages of their education.

But how are we preparing our young people for this future? What skills do they need, and how do we teach them these skills? This was the topic of last week’s online research seminar at the Raspberry Pi Foundation, with our guest speaker Juan David Rodríguez Garcia. Juan’s doctoral studies around AI in school complement his work at the Ministry of Education and Vocational Training in Spain.

Juan David Rodríguez Garcia

Juan’s LearningML tool for young people

Juan started his presentation by sharing numerous current examples of AI and machine learning, which young people can easily relate to and be excited to engage with, and which will bring up ethical questions that we need to be discussing with them.

Of course, it’s not enough for learners to be aware of AI applications. While machine learning is a complex field of study, we need to consider what aspects of it we can make accessible to young people to enable them to learn about the concepts, practices, and skills underlying it. During his talk Juan demonstrated a tool called LearningML, which he has developed as a practical introduction to AI for young people.

Screenshot of a demo of Juan David Rodríguez Garcia's LearningML tool

Juan demonstrates image recognition with his LearningML tool

LearningML takes inspiration from some of the other in-development tools around machine learning for children, such as Machine Learning for Kids, and it is available in one integrated platform. Juan gave an enticing demo of the tool, showing how to use visual image data (lots of pictures of Juan with hats, glasses on, etc.) to train and test a model. He then demonstrated how to use Scratch programming to also test the model and apply it to new data. The seminar audience was very positive about the LearningML, and of course we’d like it translated into English!

Juan’s talk generated many questions from the audience, from technical questions to the key question of the way we use the tool to introduce children to bias in AI. Seminar participants also highlighted opportunities to bring machine learning to other school subjects such as science.

AI in schools — what and how to teach

Machine learning demonstrates that computers can learn from data. This is just one of the five big ideas in AI that the AI4K12 group has identified for teaching AI in school in order to frame this broad domain:

  1. Perception: Computers perceive the world using sensors
  2. Representation & reasoning: Agents maintain models/representations of the world and use them for reasoning
  3. Learning: Computers can learn from data
  4. Natural interaction: Making agents interact comfortably with humans is a substantial challenge for AI developers
  5. Societal impact: AI applications can impact society in both positive and negative ways

One general concern I have is that in our teaching of computing in school (if we touch on AI at all), we may only focus on the fifth of the ‘big AI ideas’: the implications of AI for society. Being able to understand the ethical, economic, and societal implications of AI as this technology advances is indeed crucial. However, the principles and skills underpinning AI are also important, and how we introduce these at an age-appropriate level remains a significant question.

Illustration of AI, Image by Seanbatty from Pixabay

There are some great resources for developing a general understanding of AI principles, including unplugged activities from Computer Science For Fun. Yet there’s a large gap between understanding what AI is and has the potential to do, and actually developing the highly mathematical skills to program models. It’s not an easy issue to solve, but Juan’s tool goes a little way towards this.

At the Raspberry Pi Foundation, we’re also developing resources to bridge this educational gap, including new online projects building on our existing machine learning projects, and an online course. Watch this space!

AI in the school curriculum and workforce

All in all, we seem to be a long way off introducing AI into the school curriculum. Looking around the world, in the USA, Hong Kong, and Australia there have been moves to introduce AI into K-12 education through pilot initiatives, and hopefully more will follow. In England, with a computing curriculum that was written in 2013, there is no requirement to teach any AI or machine learning, or even to focus much on data.

Let’s hope England doesn’t get left too far behind, as there is a massive AI skills shortage, with millions of workers needing to be retrained in the next few years. Moreover, a recent House of Lords report outlines that introducing all young people to this area of computing also has the potential to improve diversity in the workforce — something we should all be striving towards.

We look forward to hearing more from Juan and his colleagues as this important work continues.

Next up in our seminar series

If you missed the seminar, you can find Juan’s presentation slides and a recording of his talk on our seminars page.

In our next seminar on Tuesday 2 June at 17:00–18:00 BST / 12:00–13:00 EDT / 9:00–10:00 PDT / 18:00–19:00 CEST, we’ll welcome Dame Celia Hoyles, Professor of Mathematics Education at University College London. Celia will be sharing insights from her research into programming and mathematics. To join the seminar, simply sign up with your name and email address and we’ll email the link and instructions. If you attended Juan’s seminar, the link remains the same.

The post Learning AI at school — a peek into the black box appeared first on Raspberry Pi.

Meet your new robotic best friend: the MiRo-E dog

Par Ashley Whittaker

When you’re learning a new language, it’s easier the younger you are. But how can we show very young students that learning to speak code is fun? Consequential Robotics has an answer…

The MiRo-E is an ’emotionally engaging’ robot platform that was created on a custom PCB  and has since moved onto Raspberry Pi. The creators made the change because they saw that schools were more familiar with Raspberry Pi and realised the potential in being able to upgrade the robotic learning tools with new Raspberry Pi boards.

The MiRo-E was born from a collaboration between Sheffield Robotics, London-based SCA design studio, and Bristol Robotics Lab. The cute robo-doggo has been shipping with Raspberry Pi 3B+ (they work well with the Raspberry Pi 4 too) for over a year now.

While the robot started as a developers’ tool (MiRo-B), the creators completely re-engineered MiRo’s mechatronics and software to turn it into an educational tool purely for the classroom environment.

Three school children in uniforms stroke the robot dog's chin

MiRo-E with students at a School in North London, UK

MiRo-E can see, hear, and interact with its environment, providing endless programming possibilities. It responds to human interaction, making it a fun, engaging way for students to learn coding skills. If you stroke it, it purrs, lights up, move its ears, and wags its tail. Making a sound or clapping makes MiRo move towards you, or away if it is alarmed. And it especially likes movement, following you around like a real, loyal canine friend. These functionalities are just the basic starting point, however: students can make MiRo do much more once they start tinkering with their programmable pet.

These opportunities are provided on MiRoCode, a user-friendly web-based coding interface, where students can run through lesson plans and experiment with new ideas. They can test code on a virtual MiRo-E to create new skills that can be applied to a real-life MiRo-E.

What’s inside?

Here are the full technical specs. But basically, MiRo-E comprises a Raspberry Pi 3B+ as its core, light sensors, cliff sensors, an HD camera, and a variety of connectivity options.

How does it interact?

MiRo reacts to sound, touch, and movement in a variety of ways. 28 capacitive touch sensors tell it when it is being petted or stroked. Six independent RGB LEDs allow it to show emotion, along with DOF to move its eyes, tail, and ears. Its ears also house four 16-bit microphones and a loudspeaker. And two differential drive wheels with opto-sensors help MiRo move around.

What else can it do?

The ‘E’ bit of MiRo-E means it’s emotionally engaging, and the intelligent pet’s potential in healthcare have already been explored. Interaction with animals has been proved to be positive for patients of all ages, but sometimes it’s not possible for ‘real’ animals to comfort people. MiRo-E can fill the gap for young children who would benefit from animal comfort, but where healthcare or animal welfare risks are barriers.

The same researchers who created this emotionally engaging robo-dog for young people are also working with project partners in Japan to develop ‘telepresence robots’ for older patients to interact with their families over video calls.

The post Meet your new robotic best friend: the MiRo-E dog appeared first on Raspberry Pi.

The Raspberry Pi Press store is looking mighty fine

Par Alex Bate

Eagle-eyed Raspberry Pi Press fans might have noticed some changes over the past few months to the look and feel of our website. Today we’re pleased to unveil a new look for the Raspberry Pi Press website and its online store.

Did you know?

Raspberry Pi Press is the publishing imprint of Raspberry Pi (Trading) Ltd, which is part of the Raspberry Pi Foundation, a UK-based charity that does loads of cool stuff with computers and computer education.

Did you also know?

Raspberry Pi Press publishes five monthly magazines: The MagPi, HackSpace Magazine, Wireframe, Custom PC, and Digital SLR Photography. It also produces a plethora of project books and gorgeous hardback beauties, such as retro gamers’ delight Code the Classics, as well as Hello World, the computing and digital making magazine for educators! Phew!

And did you also, also know?

The Raspberry Pi Press online store ships around the globe, with copies of our publications making their way to nearly every single continent on planet earth. Antarctica, we’re looking at you, kid.

It’s upgrade time!

With all this exciting work going on, it seemed only fair that Raspberry Pi Press should get itself a brand new look. We hope you’ll enjoy skimming the sparkling shelves of our online newsagents and bookshop.

Ain’t nothin’ wrong with a little tsundoku

You can pick up all the latest issues of your favourite magazines or treat yourself to a book or three, and you can also subscribe to all our publications with ease. We’ve even added a few new payment options to boot.

New delivery options

We’ve made a few changes to our shipping options, with additional choices for some regions to make sure that you can easily track your purchases and receive timely and reliable deliveries, even if you’re a long way from the Raspberry Pi Press printshop.

Customers in the UK, the EU, North America, Australia, and New Zealand won’t see any changes to delivery options. We continue to work to make sure we’re offering the best price and service we can for everyone, no matter where you are.

Have a look and see what you think!

So hop on over to the new and improved Raspberry Pi Press website to see the changes for yourself. And if you have any feedback, feel free to drop Oli and the team an email at rpipresshelp@raspberrypi.com.

The post The Raspberry Pi Press store is looking mighty fine appeared first on Raspberry Pi.

Design your own Internet of Things with HackSpace magazine

Par Andrew Gregory

In issue 31 of HackSpace magazine, out today, PJ Evans looks at DIY smart homes and homemade Internet of Things devices.

In the last decade, various companies have come up with ‘smart’ versions of almost everything. Microcontrollers have been unceremoniously crowbarred into devices that had absolutely no need for microcontrollers, and often tied to phone apps or web services that are hard to use and don’t work well with other products.

Put bluntly, the commercial world has struggled to deliver an ecosystem of useful smart products. However, the basic principle behind the connected world is good – by connecting together sensors, we can understand our local environment and control it to make our lives better. That could be as simple as making sure the plants are correctly watered, or something far more complex.

The simple fact is that we each lead different lives, and we each want different things out of our smart homes. This is why companies have struggled to create a useful smart home system, but it’s also why we, as makers, are perfectly placed to build our own. Let’s dive in and take a look at one way of doing this – using the TICK Stack – but there are many more, and we’ll explore a few alternatives later on.

Many of our projects create data, sometimes a lot of it. This could be temperature, humidity, light, position, speed, or anything else that we can measure electronically. To be useful, that data needs to be turned into information. A list of numbers doesn’t tell you a lot without careful study, but a line graph based on those numbers can show important information in an instant. Often makers will happily write scripts to produce charts and other types of infographics, but now open-source software allows anyone to log data to a database, generate dashboards of graphs, and even trigger alerts and scripts based on the incoming data. There are several solutions out there, so we’re going to focus on just one: a suite of products from InfluxData collectively known as the TICK Stack.

InfluxDB

The ‘I’ in TICK is the database that stores your precious data. InfluxDB is a time series database. It differs from regular SQL databases as it always indexes based on the time stamp of the incoming data. You can use a regular SQL database if you wish (and we’ll show you how later), but what makes InfluxDB compelling for logging data is not only its simplicity, but also its data-management features and built-in web-based API interface. Getting data into InfluxDB can be as easy as a web post, which places it within the reach of most internet-capable microcontrollers.

Kapacitor

Next up is our ‘K’. Kapacitor is a complex data processing engine that acts on data coming into your InfluxDB. It has several purposes, but the common use is to generate alerts based on data readings. Kapacitor supports a wide range of alert ‘endpoints’, from sending a simple email to alerting notification services like Pushover, or posting a message to the ubiquitous Slack. Multiple alerts to multiple destinations can be configured, and what constitutes an alert status is up to you. More advanced uses of Kapacitor include machine learning and anomaly detection.

Chronograf

The problem with Kapacitor is the configuration. It’s a lot of work with config files and the command line. Thoughtfully, InfluxData has created Chronograf, a graphical user interface to both Kapacitor and InfluxDB. If you prefer to keep away from the command line, you can query and manage your databases here as well as set up alerts, metrics that trigger an alert, and the configurations for the various handlers. This is all presented through a web app that you can access from anywhere on your network. You can also build ‘Dashboards’ – collections of charts displayed on a single page based on your InfluxDB data.

Telegraf

Finally, our ’T’ in TICK. One of the most common uses for time series databases is measuring computer performance. Telegraf provides the link between the machine it is installed on and InfluxDB. After a simple install, Telegraf will start logging all kinds of data about its host machine to your InfluxDB installation. Memory usage, CPU temperatures and load, disk space, and network performance can all be logged to your database and charted using Chronograf. This is more due to the Stack’s more common use for monitoring servers, but it’s still useful for making sure the brains of our network-of-things is working properly. If you get a problem, Kapacitor can not only trigger alerts but also user-defined scripts that may be able to remedy the situation.

Get HackSpace magazine issue 31 — out today

HackSpace magazine issue 31: on sale now!

You can read the rest of HackSpace magazine’s DIY IoT feature in issue 31, out today and available online from the Raspberry Pi Press online store. You can also download issue 31 for free.

The post Design your own Internet of Things with HackSpace magazine appeared first on Raspberry Pi.

Share your keyboard and mouse between computers with Barrier

Par Gordon Hollingworth

Declutter your desk by sharing your mouse and keyboard across multiple computers at once, including your Raspberry Pis, with Barrier. Raspberry Pi Director of Software Engineering, Gordon Hollingworth, shows you how.

Barrier walkthrough

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 Raspbe…

Desk clutter is a given

My desk is a bit untidy. Talking to people in our office, you’ll find that it’s mostly because I only clear it properly once a year, or leave it entirely until the next time we move office!

It’s cluttered with Raspberry Pis of random types, with little tags saying what’s wrong or right about each one, and then there’s every manner of SD card, adapter, JTAG connector, headphones, and whiteboard marker pens you can dream of filling the gaps.

But one thing that really annoys me is that I tend to have a mouse and keyboard per computer, and I’ve got at least four computers running at my desk at any one time.

Solutions to this problem have existed for a very long time, known as KVM (keyboard, video and mouse) switches; many people use these to switch (literally with a big toggle switch) between computer 1, 2, and 3 while using a single screen.

But if that’s what you want to do, the best solution is to use VNC on each of the computers so you can use a single display, keyboard, and mouse to access each of their screens and bring them all together.

And, that’s okay, but…

But that’s not quite what I want: I like having the mass-screen real-estate around me, and I like just glancing to the left to see my Raspberry Pi on its own screen.

If only there was a way to share my mouse and keyboard across multiple computers without having to flick switches or unplug USBs.

Well…

Barrier to the rescue!

In the same way one may set up multiple monitors for one computer, and move the mouse cursor seamlessly between them, Barrier allows you to share peripherals between multiple computers, allowing you to host your keyboard and mouse on one computer. It lets you simply drag your cursor from screen to screen, from device to device, as if by magic.

Download and set up Barrier

Barrier is free to use, and simple to set up. You can either follow the video tutorial shared above, or continue reading below:

Download barrier to your main computer

First, download and install Barrier from the developers’ installation page: github.com/debauchee/barrier/releases

At the end of the installation, the application will run. Select the Server option (the server is the one that has the keyboard and mouse that you want to share).

Next select Configure Server. Click on the computer screen in the top-right and drag it to where you want it to appear in relation to the server. It will default to being called ‘Unnamed’.

Next, double-click the new ‘Unnamed’ screen to set it up.

The only thing you need to do here is to set the screen name. Here I’ve changed it to ‘raspberrypi’.  Click OK here and on the Server configuration‘ dialogue. You’ll return to the main Barrier page. Click Reload.

Download Barrier to your Raspberry Pi computer

Now turn to your Raspberry Pi, open a terminal window (Ctrl-Alt-T if you didn’t know), and run:

sudo apt install barrier

Once installation is complete, Barrier should appear in the Accessories drop-down menu, which you can access via the main menu icon (the Raspberry Pi logo in the top right-hand corner). Select Barrier and, this time, choose Client.

If you leave Auto config selected, Barrier should just work, as long as the screen name is correct (you can change this by clicking Barrier and then Change settings) and matches the name you told the server.

And there you have it. You can now use your mouse and keyboard across both your computers. And, if you have enough desktop space for even more monitors, you can continue to add devices to Barrier until your room ends up looking something like this:

A man standing in front of a wall made of computer screens

If you use Barrier to clean up your workspace, make sure to share a ‘before’ and ‘after’ photo with us on Twitter.

The post Share your keyboard and mouse between computers with Barrier appeared first on Raspberry Pi.

Make it rain chocolate with a Raspberry Pi-powered dispenser

Par Ashley Whittaker

This fully automated M&M’s-launching machine delivers chocolate on voice command, wherever you are in the room.

A quick lesson in physics

To get our head around Harrison McIntyre‘s project, first we need to understand parabolas. Harrison explains: “If we ignore air resistance, a parabola can be defined as the arc an object describes when launching through space. The shape of a parabolic arc is determined by three variables: the object’s departure angle; initial velocity; and acceleration due to gravity.”

Harrison uses a basketball shooter to illustrate parabolas

Lucky for us, gravity is always the same, so you really only have to worry about angle and velocity. You could also get away with only changing one variable and still be able to determine where a launched object will land. But adjusting both the angle and the velocity grants much greater precision, which is why Harrison’s machine controls both exit angle and velocity of the M&M’s.

Kit list

The M&M’s launcher comprises:

  • 2 Arduino Nanos
  • 1 Raspberry Pi 3
  • 3 servo motors
  • 2 motor drivers
  • 1 DC motor
  • 1 Hall effect limit switch
  • 2 voltage converters
  • 1 USB camera
  • “Lots” of 3D printed parts
  • 1 Amazon Echo Dot

A cordless drill battery is the primary power source.

The project relies on similar principles as a baseball pitching machine. A compliant wheel is attached to a shaft sitting a few millimetres above a feeder chute that can hold up to ten M&M’s. To launch an M&M’s piece, the machine spins up the shaft to around 1500 rpm, pushes an M&M’s piece into the wheel using a servo, and whoosh, your M&M’s piece takes flight.

Controlling velocity, angle and direction

To measure the velocity of the fly wheel in the machine, Harrison installed a Hall effect magnetic limit switch, which gets triggered every time it is near a magnet.

Two magnets were placed on opposite sides of the shaft, and these pass by the switch. By counting the time in between each pulse from the limit switch, the launcher determines how fast the fly wheel is spinning. In response, the microcontroller adjusts the motor output until the encoder reports the desired rpm. This is how the machine controls the speed at which the M&M’s pieces are fired.

Now, to control the angle at which the M&M’s pieces fly out of the machine, Harrison mounted the fly wheel assembly onto a turret with two degrees of freedom, driven by servos. The turret controls the angle at which the sweets are ‘pitched’, as well as the direction of the ‘pitch’.

So how does it know where I am?

With the angle, velocity, and direction at which the M&M’s pieces fly out of the machine taken care of, the last thing to determine is the expectant snack-eater’s location. For this, Harrison harnessed vision processing.


Harrison used a USB camera and a Python script running on Raspberry Pi 3 to determine when a human face comes into view of the machine, and to calculate how far away it is. The turret then rotates towards the face, the appropriate parabola is calculated, and an M&M’s piece is fired at the right angle and velocity to reach your mouth. Harrison even added facial recognition functionality so the machine only fires M&M’s pieces at his face. No one is stealing this guy’s candy!

So what’s Alexa for?

This project is topped off with a voice-activation element, courtesy of an Amazon Echo Dot, and a Python library called Sinric. This allowed Harrison to disguise his Raspberry Pi as a smart TV named ‘Chocolate’ and command Alexa to “increase the volume of ‘Chocolate’ by two” in order to get his machine to fire two M&M’s pieces at him.

       

Drawbacks

In his video, Harrison explaining that other snack-launching machines involve a spring-loaded throwing mechanism, which doesn’t let you determine the snack’s exit velocity. That means you have less control over how fast your snack goes and where it lands. The only drawback to Harrison’s model? His machine needs objects that are uniform in shape and size, which means no oddly shaped peanut M&M’s pieces for him.

He’s created quite the monster here, in that at first, the machine’s maximum firing speed was 40 mph. And no one wants crispy-shelled chocolate firing at their face at that speed. To keep his teeth safe, Harrison switched out the original motor for one with a lower rpm, which reduced the maximum exit velocity to a much more sensible 23 mph… Please make sure you test your own snack-firing machine outdoors before aiming it at someone’s face.

Go subscribe

Check out the end of Harrison’s videos for some more testing to see what his machine was capable of: he takes out an entire toy army and a LEGO Star Wars squad by firing M&M’s pieces at them. And remember to subscribe to his channel and like the video if you enjoyed what you saw, because that’s just a nice thing to do.

The post Make it rain chocolate with a Raspberry Pi-powered dispenser appeared first on Raspberry Pi.

Coolest Projects goes online and everyone is welcome!

Par Helen Drury

We’re thrilled that Coolest Projects is taking place this summer as an online showcase, and registration opens today!

A girl presenting a digital making project

Our world-leading technology fair usually takes place as a free face-to-face event, with thousands of young people coming together to showcase projects they’ve created. After making the tough decision to cancel the Coolest Projects 2020 events in Dublin and Manchester, we began building a solution that would allow us to host our tech showcase for young people online this year.

A boy presenting his digital making project

As so many young people are currently at home all over the world, we wanted to create an online space where they can share their tech projects, be inspired by their peers, and celebrate each other’s achievements as a community.

A chance to be creative and have fun

Coolest Projects is a great opportunity for young people to get creative, have fun, learn from others, and be a part of something truly special.

A girl presenting a digital making project

To get involved in Coolest Projects, all that young people need is an idea that involves tech, and the enthusiasm to bring it to life. If they’re looking for inspiration, they can explore our Digital Making at Home series of free, weekly code-along videos and step-by-step project guides. We’ve also got support for parents who want to learn more about the tools and programs their children could use to create a tech project.

We invite all creators and all project types!

Coolest Projects is open to anyone up to the age of 18, and young people can join wherever they are in the world. Creators at all levels of experience are encouraged, with projects from beginner to advanced, and it doesn’t matter whether the project is a work in progress, a prototype, or a finished product — every participant and every project are welcome!

A young person at a laptop

Young creators get to share their ideas with the world

All submitted projects will be showcased for the whole world to see in the new Coolest Projects online gallery, so that we can all celebrate the effort, enthusiasm, and creativity of young people who have turned an idea into reality using tech.

A boy working on a Raspberry Pi robot buggy

In the online gallery, you’ll be able to filter projects and explore at your leisure. We’ve enlisted some special judges to help us pick out favourites!

Why do young people take part in Coolest Projects?

Estela Liobikaitė from Strokestown, Co. Roscommon in Ireland took part in Coolest Projects International last year. She began coding at school with her teacher, Ms Gilleran, and developed a love for animation. Estela talks about the possibilities coding gives young people:

“I like coding because it is very entertaining to play to learn about technology. Coding gives a person many opportunities and possibilities.”

A teenage girl presenting a digital making project on a tablet

Estela at Coolest Projects International 2019

Sofia and Mihai, both aged 9, also took part in Coolest Projects International 2019. They travelled to the Dublin event from Slatina in Romania, where they attend a Code Club in their community. Sofia and Mihai both love animals and created their project, Friendship Saves Endangered Species, to raise awareness about the fragile ecosystem.

A girl and a boy holding up a book about coding

Sofia and Mihai at Coolest Projects 2019

Their advice for other young people thinking of getting involved in Coolest Projects is: “Follow your dream, put your ideas into practice, because Coolest Projects is a great opportunity!”

Get involved with Coolest Projects

If you know a young person who has made a digital creation, then encourage them to register it for Coolest Projects, be it an animation, website, game, app, robot, or anything else they’ve built with technology. Projects can be registered in the following categories: Hardware; Scratch; Mobile Apps; Websites; Games; Advanced Programming.

To register a project or find out more about taking part, visit coolestprojects.org. Registration closes on 28 June 2020.

 

PS This year’s Coolest Projects online showcase wouldn’t be possible without the support of our sponsors — thank you!

Platinum sponsors

Facebook, BNY Mellon, Liberty Global, Blizzard Entertainment, EPAM

Gold sponsors

Workday, Twitter

SME and community supporter

PayPal

The post Coolest Projects goes online and everyone is welcome! appeared first on Raspberry Pi.

Setting up two-factor authentication on your Raspberry Pi

Par Alasdair Allan

Enabling two-factor authentication (2FA) to boost security for your important accounts is becoming a lot more common these days. However you might be surprised to learn that you can do the same with your Raspberry Pi. You can enable 2FA on Raspberry Pi, and afterwards you’ll be challenged for a verification code when you access it remotely via Secure Shell (SSH).

Accessing your Raspberry Pi via SSH

A lot of people use a Raspberry Pi at home as a file, or media, server. This is has become rather common with the launch of Raspberry Pi 4, which has both USB 3 and Gigabit Ethernet. However, when you’re setting up this sort of server you often want to run it “headless”; without a monitor, keyboard, or mouse. This is especially true if you intend tuck your Raspberry Pi away behind your television, or somewhere else out of the way. In any case, it means that you are going to need to enable Secure Shell (SSH) for remote access.

However, it’s also pretty common to set up your server so that you can access your files when you’re away from home, making your Raspberry Pi accessible from the Internet.

Most of us aren’t going to be out of the house much for a while yet, but if you’re taking the time right now to build a file server, you might want to think about adding some extra security. Especially if you intend to make the server accessible from the Internet, you probably want to enable two-factor authentication (2FA) using Time-based One-Time Password (TOTP).

What is two-factor authentication?

Two-factor authentication is an extra layer of protection. As well as a password, “something you know,” you’ll need another piece of information to log in. This second factor will be based either on “something you have,” like a smart phone, or on “something you are,” like biometric information.

We’re going to go ahead and set up “something you have,” and use your smart phone as the second factor to protect your Raspberry Pi.

Updating the operating system

The first thing you should do is make sure your Raspberry Pi is up to date with the latest version of Raspbian. If you’re running a relatively recent version of the operating system you can do that from the command line:

$ sudo apt-get update
$ sudo apt-get full-upgrade

If you’re pulling your Raspberry Pi out of a drawer for the first time in a while, though, you might want to go as far as to install a new copy of Raspbian using the new Raspberry Pi Imager, so you know you’re working from a good image.

Enabling Secure Shell

The Raspbian operating system has the SSH server disabled on boot. However, since we’re intending to run the board without a monitor or keyboard, we need to enable it if we want to be able to SSH into our Raspberry Pi.

The easiest way to enable SSH is from the desktop. Go to the Raspbian menu and select “Preferences > Raspberry Pi Configuration”. Next, select the “Interfaces” tab and click on the radio button to enable SSH, then hit “OK.”

You can also enable it from the command line using systemctl:

$ sudo systemctl enable ssh
$ sudo systemctl start ssh

Alternatively, you can enable SSH using raspi-config, or, if you’re installing the operating system for the first time, you can enable SSH as you burn your SD Card.

Enabling challenge-response

Next, we need to tell the SSH daemon to enable “challenge-response” passwords. Go ahead and open the SSH config file:

$ sudo nano /etc/ssh/sshd_config

Enable challenge response by changing ChallengeResponseAuthentication from the default no to yes.

Editing /etc/ssh/ssd_config.

Then restart the SSH daemon:

$ sudo systemctl restart ssh

It’s good idea to open up a terminal on your laptop and make sure you can still SSH into your Raspberry Pi at this point — although you won’t be prompted for a 2FA code quite yet. It’s sensible to check that everything still works at this stage.

Installing two-factor authentication

The first thing you need to do is download an app to your phone that will generate the TOTP. One of the most commonly used is Google Authenticator. It’s available for Android, iOS, and Blackberry, and there is even an open source version of the app available on GitHub.

Google Authenticator in the App Store.

So go ahead and install Google Authenticator, or another 2FA app like Authy, on your phone. Afterwards, install the Google Authenticator PAM module on your Raspberry Pi:

$ sudo apt install libpam-google-authenticator

Now we have 2FA installed on both our phone, and our Raspberry Pi, we’re ready to get things configured.

Configuring two-factor authentication

You should now run Google Authenticator from the command line — without using sudo — on your Raspberry Pi in order to generate a QR code:

$ google-authenticator

Afterwards you’re probably going to have to resize the Terminal window so that the QR code is rendered correctly. Unfortunately, it’s just slightly wider than the standard 80 characters across.

The QR code generated by google-authenticator. Don’t worry, this isn’t the QR code for my key; I generated one just for this post that I didn’t use.

Don’t move forward quite yet! Before you do anything else you should copy the emergency codes and put them somewhere safe.

These codes will let you access your Raspberry Pi — and turn off 2FA — if you lose your phone. Without them, you won’t be able to SSH into your Raspberry Pi if you lose or break the device you’re using to authenticate.

Next, before we continue with Google Authenticator on the Raspberry Pi, open the Google Authenticator app on your phone and tap the plus sign (+) at the top right, then tap on “Scan barcode.”

Your phone will ask you whether you want to allow the app access to your camera; you should say “Yes.” The camera view will open. Position the barcode squarely in the green box on the screen.

Scanning the QR code with the Google Authenticator app.

As soon as your phone app recognises the QR code it will add your new account, and it will start generating TOTP codes automatically.

The TOTP in Google Authenticator app.

Your phone will generate a new one-time password every thirty seconds. However, this code isn’t going to be all that useful until we finish what we were doing on your Raspberry Pi. Switch back to your terminal window and answer “Y” when asked whether Google Authenticator should update your .google_authenticator file.

Then answer “Y” to disallow multiple uses of the same authentication token, “N” to increasing the time skew window, and “Y” to rate limiting in order to protect against brute-force attacks.

You’re done here. Now all we have to do is enable 2FA.

Enabling two-factor authentication

We’re going to use Linux Pluggable Authentication Modules (PAM), which provides dynamic authentication support for applications and services, to add 2FA to SSH on Raspberry Pi.

Now we need to configure PAM to add 2FA:

$ sudo nano /etc/pam.d/sshd

Add auth required pam_google_authenticator.so to the top of the file. You can do this either above or below the line that says @include common-auth.

Editing /etc/pam.d/sshd.

As I prefer to be prompted for my verification code after entering my password, I’ve added this line after the @include line. If you want to be prompted for the code before entering your password you should add it before the @include line.

Now restart the SSH daemon:

$ sudo systemctl restart ssh

Next, open up a terminal window on your laptop and try and SSH into your Raspberry Pi.

Wrapping things up

If everything has gone to plan, when you SSH into the Raspberry Pi, you should be prompted for a TOTP after being prompted for your password.

SSH’ing into my Raspberry Pi.

You should go ahead and open Google Authenticator on your phone, and enter the six-digit code when prompted. Then you should be logged into your Raspberry Pi as normal.

You’ll now need your phone, and a TOTP, every time you ssh into, or scp to and from, your Raspberry Pi. But because of that, you’ve just given a huge boost to the security of your device.

Now you have the Google Authenticator app on your phone, you should probably start enabling 2FA for your important services and sites — like Google, Twitter, Amazon, and others — since most bigger sites, and many smaller ones, now support two-factor authentication.

The post Setting up two-factor authentication on your Raspberry Pi appeared first on Raspberry Pi.

Help medical research with folding@home

Par Ben Hardwidge

Did you know: the first machine to break the exaflop barrier (one quintillion floating‑point operations per second) wasn’t a huge dedicated IBM supercomputer, but a bunch of interconnected PCs with ordinary CPUs and gaming GPUs.

With that in mind, welcome to the Folding@home project, which is targeting its enormous power at COVID-19 research. It’s effectively the world’s fastest supercomputer, and your PC can be a part of it.

COVID-19

The Folding@home project is now targeting COVID-19 research

Folding@home with Custom PC

Put simply, Folding@home runs hugely complicated simulations of protein molecules for medical research. They would usually take hundreds of years for a typical computer to process. However, by breaking them up into smaller work units, and farming them out to thousands of independent machines on the Internet, it’s possible to run simulations that would be impossible to run experimentally.

Back in 2004, Custom PC magazine started its own Folding@home team. The team is currently sitting at number 12 on the world leaderboard and we’re still going strong. If you have a PC, you can join us (or indeed any Folding@home team) and put your spare clock cycles towards COVID-19 research.

Get folding

Getting your machine folding is simple. First, download the client. Your username can be whatever you like, and you’ll need to put in team number 35947 to fold for the Custom PC & bit-tech team. If you want your PC to work on COVID-19 research, select ‘COVID-19’ in the ‘I support research finding’ pulldown menu.

Set your username and team number

Enter team number 35947 to fold for the Custom PC & bit-tech team

You’ll get the most points per Watt from GPU folding, but your CPU can also perform valuable research that can’t be done on your GPU. ‘There are actually some things we can do on CPUs that we can’t do on GPUs,’ said Professor Greg Bowman, Director of Folding@home, speaking to Custom PC in the latest issue.

‘With the current pandemic in mind, one of the things we’re doing is what are called “free energy calculations”. We’re simulating proteins with small molecules that we think might be useful starting points for developing therapeutics, for example.’

Select COVID-19 from the pulldown menu

If you want your PC to work on COVID-19 research, select ‘COVID-19’ in the ‘I support research finding’ pulldown menu

Bear in mind that enabling folding on your machine will increase power consumption. For reference, we set up folding on a Ryzen 7 2700X rig with a GeForce GTX 1070 Ti. The machine consumes around 70W when idle. That figure increases to 214W when folding on the CPU and around 320W when folding on the GPU as well. If you fold a lot, you’ll see an increase in your electricity bill, so keep an eye on it.

Folding on Arm?

Could we also see Folding@home running on Arm machines, such as Raspberry Pi? ‘Oh I would love to have Folding@home running on Arm,’ says Bowman. ‘I mean they’re used in Raspberry Pis and lots of phones, so I think this would be a great future direction. We’re actually in contact with some folks to explore getting Folding@home running on Arm in the near future.’

In the meantime, you can still recruit your Raspberry Pi for the cause by participating in Rosetta@home, a similar project also working to help the fight against COVID-19. For more information, visit the Rosetta@home website.

You’ll also find a full feature about Folding@home and its COVID-19 research in Issue 202 of Custom PC, available from the Raspberry Pi Press online store.

The post Help medical research with folding@home appeared first on Raspberry Pi.

Making the best of it: online learning and remote teaching

Par Sue Sentance

As many educators across the world are currently faced with implementing some form of remote teaching during school closures, we thought this topic was ideal for the very first of our seminar series about computing education research.

Image by Mudassar Iqbal from Pixabay

Research into online learning and remote teaching

At the Raspberry Pi Foundation, we are hosting a free online seminar every second Tuesday to explore a wide variety of topics in the area of digital and computing education. Last Tuesday we were delighted to welcome Dr Lauren Margulieux, Assistant Professor of Learning Sciences at Georgia State University, USA. She shared her findings about different remote teaching approaches and practical tips for educators in the current crisis.

Lauren’s research interests are in educational technology and online learning, particularly for computing education. She focuses on designing instructions in a way that supports online students who do not necessarily have immediate access to a teacher or instructor to ask questions or overcome problem-solving impasses.

A vocabulary for online and blended learning

In non-pandemic situations, online instruction comes in many forms to serve many purposes, both in higher education and in K-12 (primary and secondary school). Much research has been carried out in how online learning can be used for successful learning outcomes, and in particular, how it can be blended with face-to-face (hybrid learning) to maximise the impact of both contexts.

In her seminar talk, Lauren helped us to understand the different ways in which online learning can take place, by sharing with us vocabulary to better describe different ways of learning with and through technology.

Lauren presented a taxonomy for classifying types of online and blended teaching and learning in two dimensions (shown in the image below). These are delivery type (technology or instructor), and whether content is received by learners, or actually being applied in the learning experience.

Lauren Margulieux seminar slide showing her taxonomy for different types of mixed student instruction

In Lauren’s words: “The taxonomy represents the four things that we control as instructors. We can’t control whether our students talk to each other or email each other, or ask each other questions […], therefore this taxonomy gives us a tool for defining how we design our classes.”

This taxonomy illustrates that there are a number of different ways in which the four types of instruction — instructor-transmitted, instructor-mediated, technology-transmitted, and technology-mediated — can be combined in a learning experience that uses both online and face-to-face elements.

Using her taxonomy in an examination (meta-analysis) of 49 studies relating to computer science teaching in higher education, Lauren found a range of different ways of mixing instruction, which are shown in the graph below.

  • Lecture hybrid means that the teaching is all delivered by the teacher, partly face-to-face and partly online.
  • Practice hybrid means that the learning is done through application of content and receiving feedback, which happens partly face-to-face or synchronously and partly online or asynchronously.
  • Replacement blend refers to instruction where lecture and practice takes place in a classroom and part of both is replaced with an online element.
  • Flipped blend instruction is where the content is transmitted through the use of technology, and the application of the learning is supported through an instructor. Again, the latter element can also take place online, but it is synchronous rather than asynchronous — as is the case in our current context.
  • Supplemental blend learning refers to instruction where content is delivered face-to-face, and then practice and application of content, together with feedback, takes place online — basically the opposite of the flipped blend approach.

Lauren Margulieux seminar slide showing learning outcomes of different types of mixed student instruction

Lauren’s examination found that the flipped blend approach was most likely to demonstrate improved learning outcomes. This is a useful finding for the many schools (and universities) that are experimenting with a range of different approaches to remote teaching.

Another finding of Lauren’s study was that approaches that involve the giving of feedback promoted improved learning. This has also been found in studies of assessment for learning, most notably by Black and Wiliam. As Lauren pointed out, the implication is that the reason blended and flipped learning approaches are the most impactful is that they include face-to-face or synchronous time for the educator to discuss learning with the students, including giving feedback.

Lauren’s tips for remote teaching

Of course we currently find ourselves in the midst of school closures across the world, so our only option in these circumstances is to teach online. In her seminar talk, Lauren also included some tips from her own experience to help educators trying to support their students during the current crisis:

  • Align learning objectives, instruction, activities, assignments, and assessments.
  • Use good equipment: headphones to avoid echo and a good microphone to improve clarity and reduce background noise.
  • Be consistent in disseminating information, as there is a higher barrier to asking questions.
  • Highlight important points verbally and visually.
  • Create ways for students to talk with each other, through discussions, breakout rooms, opportunities to talk when you aren’t present, etc.
  • Use video when possible while talking with your students.
    Give feedback frequently, even if only very brief.

Although Lauren’s experience is primarily from higher education (post-18), this advice is also useful for K-12 educators.

What about digital equity and inclusion?

All our seminars include an opportunity to break out into small discussion groups, followed by an opportunity to ask questions of the speaker. We had an animated follow-up discussion with Lauren, with many questions focused on issues of representation and inclusion. Some questions related to the digital divide and how we could support learners who didn’t have access to the technology they need. There were also questions from breakout groups about the participation of groups that are typically under-represented in computing education in online learning experiences, and accessibility for those with special educational needs and disabilities (SEND). While there is more work needed in this area, there’s also no one-size-fits-all approach to working with students with special needs, whether that’s due to SEND or to material resources (e.g. access to technology). What works for one student based on their needs might be entirely ineffective for others. Overall, the group concluded that there was a need for much more research in these areas, particularly at K-12 level.

Much anxiety has been expressed in the media, and more formally through bodies such as the World Economic Forum and UNESCO, about the potential long-lasting educational impact of the current period of school closures on disadvantaged students and communities. Research into the most inclusive way of supporting students through remote teaching will help here, as will the efforts of governments, charities, and philanthropists to provide access to technology to learners in need.

At the Raspberry Pi Foundation, we offer lots of free resources for students, educators, and parents to help them engage with computing education during the current school closures and beyond.

How should the education community move forward?

Lauren’s seminar made it clear to me that she was able to draw on decades of research studies into online and hybrid learning, and that we should take lessons from these before jumping to conclusions about the future. In both higher education (tertiary, university) and K-12 (primary, secondary) education contexts, we do not yet know the educational impact of the teaching experiments we have found ourselves engaging in at short notice. As Charles Hodges and colleagues wrote recently in Educause, what we are currently engaging in can only really be described as emergency remote teaching, which stands in stark contrast to planned online learning that is designed much more carefully with pedagogy, assessment, and equity in mind. We should ensure we learn lessons from the online learning research community rather than making it up as we go along.

Today many writers are reflecting on the educational climate we find ourselves in and on how it will impact educational policy and decision-making in the future. For example, an article from the Brookings Institution suggests that the experiences of home teaching and learning that we’ve had in the last couple of months may lead to both an increased use of online tools at home, an increase in home schooling, and a move towards competency-based learning. An article by Jo Johnson (President’s Professorial Fellow at King’s College London) on the impact of the pandemic on higher education, suggests that traditional universities will suffer financially due to a loss of income from international students less likely to travel to universities in the UK, USA, and Australia, but that the crisis will accelerate take-up of online, distance-learning, and blended courses for far-sighted and well-organised institutions that are ready to embrace this opportunity, in sum broadening participation and reducing elitism. We all need to be ready and open to the ways in which online and hybrid learning may change the academic world as we know it.

Next up in our seminar series

If you missed this seminar, you can find Lauren’s presentation slides and a recording of her talk on our seminars page.

Next Tuesday, 19 May at 17:00–18:00 BST, we will welcome Juan David Rodríguez from the Instituto Nacional de Tecnologías Educativas y de Formación del Profesorado (INTEF) in Spain. His seminar talk will be about learning AI at school, and about a new tool called LearningML. To join the seminar, simply sign up with your name and email address and we’ll email the link and instructions. If you attended Lauren’s seminar, the link remains the same.

The post Making the best of it: online learning and remote teaching appeared first on Raspberry Pi.

Fix slow Nintendo Switch play with your Raspberry Pi

Par Ashley Whittaker

Is your Nintendo Switch behaving more like a Nintendon’t due to poor connectivity? Well, TopSpec (hosted Chris Barlas) has shared a brilliant Raspberry Pi-powered hack on YouTube to help you fix that.

 

Here’s the problem…

When you play Switch online, the servers are peer-to-peer. The Switches decide which Switch’s internet connection is more stable, and that player becomes the host.

However, some users have found that poor internet performance causes game play to lag. Why? It’s to do with the way data is shared between the Switches, as ‘packets’.

 

What are packets?

Think of it like this: 200 postcards will fit through your letterbox a few at a time, but one big file wrapped as a parcel won’t. Even though it’s only one, it’s too big to fit. So instead, you could receive all the postcards through the letterbox and stitch them together once they’ve been delivered.

Similarly, a packet is a small unit of data sent over a network, and packets are reassembled into a whole file, or some other chunk of related data, by the computer that receives them.

Problems arise if any of the packets containing your Switch game’s data go missing, or arrive late. This will cause the game to pause.

Fix Nintendo Switch Online Lag with a Raspberry Pi! (Ethernet Bridge)

Want to increase the slow internet speed of your Nintendo Switch? Having lag in games like Smash, Mario Maker, and more? Well, we decided to try out a really…

Chris explains that games like Call of Duty have code built in to mitigate the problems around this, but that it seems to be missing from a lot of Switch titles.

 

How can Raspberry Pi help?

The advantage of using Raspberry Pi is that it can handle wireless networking more reliably than Nintendo Switch on its own. Bring the two devices together using a LAN adapter, and you’ve got a perfect pairing. Chris reports speeds up to three times faster using this hack.

A Nintendo Switch > LAN adaptor > Raspberry Pi

He ran a download speed test using a Nintendo Switch by itself, and then using a Nintendo Switch with a LAN adapter plugged into a Raspberry Pi. He found the Switch connected to the Raspberry Pi was quicker than the Switch on its own.

At 02mins 50secs of Chris’ video, he walks through the steps you’ll need to take to get similar results.

We’ve handily linked to some of the things Chris mentions here:

 

 

To test his creation, Chris ran a speed test downloading a 10GB game, Pokémon Shield, using three different connection solutions. The Raspberry Pi hack came out “way ahead” of the wireless connection relying on the Switch alone. Of course, plugging your Switch directly into your internet router would get the fastest results of all, but routers have a habit of being miles away from where you want to sit and play.

Have a look at TopSpec on YouTube for more great videos.

The post Fix slow Nintendo Switch play with your Raspberry Pi appeared first on Raspberry Pi.

Go back in time with a Raspberry Pi-powered radio

Par Ashley Whittaker

Take a musical trip down memory lane all the way back to the 1920s.

Sick of listening to the same dozen albums on repeat, or feeling stifled by the funnel of near-identical YouTube playlist rabbit holes? If you’re looking to broaden your musical horizons and combine that quest with a vintage-themed Raspberry Pi–powered project, here’s a great idea…

Alex created a ‘Radio Time Machine’ that covers 10 decades of music, from the 1920s up to the 2020s. Each decade has its own Spotify playlist, with hundreds of songs from that decade played randomly. This project with the look of a vintage radio offers a great, immersive learning experience and should throw up tonnes of musical talent you’ve never heard of.

In the comments section of their reddit post, Alex explained that replacing the screen of the vintage shell they housed the tech in was the hardest part of the build. On the screen, each decade is represented with a unique icon, from a gramophone, through to a cassette tape and the cloud. Here’s a closer look at it:

Now let’s take a look at the hardware and software it took to pull the whole project together…

Hardware:

  • Vintage Bluetooth radio (Alex found this affordable one on Amazon)
  • Raspberry Pi 4
  • Arduino Nano
  • 2 RGB LEDs for the dial
  • 1 button (on the back) to power on/off (long press) or play the next track (short press)

The Raspberry Pi 4 audio output is connected to the auxiliary input on the radio (3.5mm jack).

Software:

    • Mopidy library (Spotify)
    • Custom NodeJS app with JohnnyFive library to read the button and potentiometer values, trigger the LEDs via the Arduino, and load the relevant playlists with Mopidy

Take a look at the video on reddit to hear the Radio Time Machine in action. The added detail of the white noise that sounds as the dial is turned to switch between decades is especially cool.

How do you find ten decades of music?

Alex even went to the trouble of sharing each decade’s playlist in the comments of their original reddit post.

Here you go:

1920s
1930s
1940s
1950s
1960s
1970s
1980s
1990s
2000s
2010s

Comment below to tell us which decade sounds the coolest to you. We’re nineties kids ourselves!

The post Go back in time with a Raspberry Pi-powered radio appeared first on Raspberry Pi.

Retro Nixie tube lights get smart

Par Ashley Whittaker

Nixie tubes: these electronic devices, which can display numerals or other information using glow discharge, made their first appearance in 1955, and they remain popular today because of their cool, vintage aesthetic. Though lots of companies manufactured these items back in the day, the name ‘Nixie’ is said to derive from a Burroughs corporation’s device named NIX I, an abbreviation of ‘Numeric Indicator eXperimental No. 1’.

We liked this recent project shared on reddit, where user farrp2011 used Raspberry Pi  to make his Nixie tube display smart enough to tell the time.

A still from Farrp2011’s video shows he’s linked the bulb displays up to tell the time

Farrp2011’s set-up comprises six Nixie tubes controlled by Raspberry Pi 3, along with eight SN74HC shift registers to turn the 60 transistors on and off that ground the pin for the digits to be displayed on the Nixie tubes. Sounds complicated? Well, that’s why farrp2011 is our favourite kind of DIY builder — they’ve put all the code for the project on GitHub.

Tales of financial woe from users trying to source their own Nixie tubes litter the comments section on the reddit post, but farrp2011 says they were able to purchase the ones used in this project for about about $15 each on eBay. Here’s a closer look at the bulbs, courtesy of a previous post by farrp2011 sharing an earlier stage of project…

Farrp2011 got started with one, then two Nixie bulbs before building up to six for the final project

Digging through the comments, we learned that for the video, farrp2011 turned their house lights off to give the Nixie tubes a stronger glow. So the tubes are not as bright in real life as they appear. We also found out that the drop resistor is 22k, with 170V as the supply. Another comments section nugget we liked was the name of the voltage booster boards used for each bulb: “Pile o’Poo“.

Upcoming improvements farrp201 has planned include displaying the date, temperature, and Bitcoin exchange rate, but more suggestions are welcome. They’re also going to add some more capacitors to help with a noise problem and remove the need for the tubes to be turned off before changing the display.

And for extra nerd-points, we found this mesmerising video from Dalibor Farný showing the process of making Nixie tubes:

The post Retro Nixie tube lights get smart appeared first on Raspberry Pi.

Code Robotron: 2084’s twin-stick action | Wireframe #38

Par Ryan Lambie

News flash! Before we get into our Robotron: 2084 code, we have some important news to share about Wireframe: as of issue 39, the magazine will be going monthly.

The new 116-page issue will be packed with more in-depth features, more previews and reviews, and more of the guides to game development that make the magazine what it is. The change means we’ll be able to bring you new subscription offers, and generally make the magazine more sustainable in a challenging global climate.

As for existing subscribers, we’ll be emailing you all to let you know how your subscription is changing, and we’ll have some special free issues on offer as a thank you for your support.

The first monthly issue will be out on 4 June, and subsequent editions will be published on the first Thursday of every month after that. You’ll be able to order a copy online, or you’ll find it in selected supermarkets and newsagents if you’re out shopping for essentials.

We now return you to our usual programming…

Move in one direction and fire in another with this Python and Pygame re-creation of an arcade classic. Raspberry Pi’s own Mac Bowley has the code.

Robotron: 2084 is often listed on ‘best game of all time’ lists, and has been remade and re-released for numerous systems over the years.

Robotron: 2084

Released back in 1982, Robotron: 2084 popularised the concept of the twin-stick shooter. It gave players two joysticks which allowed them to move in one direction while also shooting at enemies in another. Here, I’ll show you how to recreate those controls using Python and Pygame. We don’t have access to any sticks, only a keyboard, so we’ll be using the arrow keys for movement and WASD to control the direction of fire.

The movement controls use a global variable, a few if statements, and two built-in Pygame functions: on_key_down and on_key_up. The on_key_down function is called when a key on the keyboard is pressed, so when the player presses the right arrow key, for example, I set the x direction of the player to be a positive 1. Instead of setting the movement to 1, instead, I’ll add 1 to the direction. The on_key_down function is called when a button’s released. A key being released means the player doesn’t want to travel in that direction anymore and so we should do the opposite of what we did earlier – we take away the 1 or -1 we applied in the on_key_up function.

We repeat this process for each arrow key. Moving the player in the update() function is the last part of my movement; I apply a move speed and then use a playArea rect to clamp the player’s position.

The arena background and tank sprites were created in Piskel. Separate sprites for the tank allow the turret to rotate separately from the tracks.

Turn and fire

Now for the aiming and rotating. When my player aims, I want them to set the direction the bullets will fire, which functions like the movement. The difference this time is that when a player hits an aiming key, I set the direction directly rather than adjusting the values. If my player aims up, and then releases that key, the shooting will stop. Our next challenge is changing this direction into a rotation for the turret.

Actors in Pygame can be rotated in degrees, so I have to find a way of turning a pair of x and y directions into a rotation. To do this, I use the math module’s atan2 function to find the arc tangent of two points. The function returns a result in radians, so it needs to be converted. (You’ll also notice I had to adjust mine by 90 degrees. If you want to avoid having to do this, create a sprite that faces right by default.)

To fire bullets, I’m using a flag called ‘shooting’ which, when set to True, causes my turret to turn and fire. My bullets are dictionaries; I could have used a class, but the only thing I need to keep track of is an actor and the bullet’s direction.

Here’s Mac’s code snippet, which creates a simple twin-stick shooting mechanic in Python. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code and assets, go here.

You can look at the update function and see how I’ve implemented a fire rate for the turret as well. You can edit the update function to take a single parameter, dt, which stores the time since the last frame. By adding these up, you can trigger a bullet at precise intervals and then reset the timer.

This code is just a start – you could add enemies and maybe other player weapons to make a complete shooting experience.

Get your copy of Wireframe issue 38

You can read more features like this one in Wireframe issue 38, available directly from Raspberry Pi Press — we deliver worldwide.

And if you’d like a handy digital version of the magazine, you can also download issue 38 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 Robotron: 2084’s twin-stick action | Wireframe #38 appeared first on Raspberry Pi.

Learn at home: a guide for parents #2

Par Katie Gouskos

With millions of schools still in lockdown, parents have been telling us that they need help to support their children with learning computing at home. As well as providing loads of great content for young people, we’ve been working on support tutorials specifically for parents who want to understand and learn about the programmes used in schools and our resources.

If you don’t know your Scratch from your Trinket and your Python, we’ve got you!

Glen, Web Developer at the Raspberry Pi Foundation, and Maddie, aged 8

 

What are Python and Trinket all about?

In our last blog post for parents, we talked to you about Scratch, the programming language used in most primary schools. This time Mark, Youth Programmes Manager at the Raspberry Pi Foundation, takes you through how to use Trinket. Trinket is a free online platform that lets you write and run your code in any web browser. This is super useful because it means you don’t have to install any new software.

A parents’ introduction to Trinket

Sign up to our regular parents’ newsletter to receive regular, FREE tutorials, tips & fun projects for young people of all levels of experience: http://rpf.i…

Trinket also lets you create public web pages and projects that can be viewed by anyone with the link to them. That means your child can easily share their coding creation with others, and for you that’s a good opportunity to talk to them about staying safe online and not sharing any personal information.

Lincoln, aged 10

Getting to know Python

We’ve also got an introduction to Python for you, from Mac, a Learning Manager on our team. He’ll guide you through what to expect from Python, which is a widely used text-based programming language. For many learners, Python is their first text-based language, because it’s very readable, and you can get things done with fewer lines of code than in many other programming languages. In addition, Python has support for ‘Turtle’ graphics and other features that make coding more fun and colourful for learners. Turtle is simply a Python feature that works like a drawing board, letting you control a turtle to draw anything you like using code.

A parents’ introduction to Python

Sign up to our regular parents’ newsletter to receive regular, FREE tutorials, tips & fun projects for young people of all levels of experience: http://rpf.i…

Why not try out Mac’s suggestions of Hello world, Countdown timer, and Outfit recommender for  yourself?

Python is used in lots of real-world software applications in industries such as aerospace, retail banking, insurance and healthcare, so it’s very useful for your children to learn it!

Parent diary: juggling homeschooling and work

Olympia is Head of Youth Programmes at the Raspberry Pi Foundation and also a mum to two girls aged 9 and 11. She is currently homeschooling them as well as working (and hopefully having the odd evening to herself!). Olympia shares her own experience of learning during lockdown and how her family are adapting to their new routine.

Parent diary: Juggling homeschooling and work

Olympia Brown, Head of Youth Partnerships at the Raspberry Pi Foundation shares her experience of homeschooling during the lockdown, and how her family are a…

Digital Making at Home

To keep young people entertained and learning, we launched our Digital Making at Home series, which is free and accessible to everyone. New code-along videos are released every Monday, with different themes and projects for all levels of experience.

Code along live with the team on Wednesday 6 May at 14:00 BST / 9:00 EDT for a special session of Digital Making at Home

Sarah and Ozzy, aged 13

We want your feedback

We’ve been asking parents what they’d like to see as part of our initiative to support young people and parents. We’ve had some great suggestions so far! If you’d like to share your thoughts, you can email us at parents@raspberrypi.org.

Sign up for our bi-weekly emails, tailored to your needs

Sign up now to start receiving free activities suitable to your child’s age and experience level, straight to your inbox. And let us know what you as a parent or guardian need help with, and what you’d like more or less of from us. 

PS: All of our resources are completely free. This is made possible thanks to the generous donations of individuals and organisations. Learn how you can help too!

 

The post Learn at home: a guide for parents #2 appeared first on Raspberry Pi.

How to work from home with Raspberry Pi | The Magpi 93

Par Ashley Whittaker

If you find yourself working or learning, or simply socialising from home, Raspberry Pi can help with everything from collaborative productivity to video conferencing. Read more in issue #92 of The MagPi, out now.

01 Install the camera

If you’re using a USB webcam, you can simply insert it into a USB port on Raspberry Pi. If you’re using a Raspberry Pi Camera Module, you’ll need to unpack it, then find the ‘CAMERA’ port on the top of Raspberry Pi – it’s just between the second micro-HDMI port and the 3.5mm AV port. Pinch the shorter sides of the port’s tab with your nails and pull it gently upwards. With Raspberry Pi positioned so the HDMI ports are at the bottom, insert one end of the camera’s ribbon cable into the port so the shiny metal contacts are facing the HDMI port. Hold the cable in place, and gently push the tab back home again.

If the Camera Module doesn’t have the ribbon cable connected, repeat the process for the connector on its underside, making sure the contacts are facing downwards towards the module. Finally, remove the blue plastic film from the camera lens.

02 Enable Camera Module access

Before you can use your Raspberry Pi Camera Module, you need to enable it in Raspbian. If you’re using a USB webcam, you can skip this step. Otherwise, click on the raspberry menu icon in Raspbian, choose Preferences, then click on Raspberry Pi Configuration.

When the tool loads, click on the Interfaces tab, then click on the ‘Enabled’ radio button next to Camera. Click OK, and let Raspberry Pi reboot to load your new settings. If you forget this step, Raspberry Pi won’t be able to communicate with the Camera Module.

03 Set up your microphone

If you’re using a USB webcam, it may come with a microphone built-in; otherwise, you’ll need to connect a USB headset, a USB microphone and separate speakers, or a USB sound card with analogue microphone and speakers to Raspberry Pi. Plug the webcam into one of Raspberry Pi’s USB 2.0 ports, furthest away from the Ethernet connector and marked with black plastic inners.

Right-click on the speaker icon at the top-right of the Raspbian desktop and choose Audio Inputs. Find your microphone or headset in the list, then click it to set it as the default input. If you’re using your TV or monitor’s speakers, you’re done; if you’re using a headset or separate speakers, right-click on the speaker icon and choose your device from the Audio Outputs menu as well.

04 Set access permissions

Click on the Internet icon next to the raspberry menu to load the Chromium web browser. Click in the address box and type hangouts.google.com. When the page loads, click ‘Sign In’ and enter your Google account details; if you don’t already have a Google account, you can sign up for one free of charge.

When you’ve signed in, click Video Call. You’ll be prompted to allow Google Hangouts to access both your microphone and your camera. Click Allow on the prompt that appears. If you Deny access, nobody in the video chat will be able to see or hear you!

05 Invite friends or join a chat

You can invite friends to your video chat by writing their email address in the Invite People box, or copying the link and sending it via another messaging service. They don’t need their own Raspberry Pi to participate – you can use Google Hangouts from a laptop, desktop, smartphone, or tablet. If someone has sent you a link to their video chat, open the message on Raspberry Pi and simply click the link to join automatically.

You can click the microphone or video icons at the bottom of the window to temporarily disable the microphone or camera; click the red handset icon to leave the call. You can click the three dots at the top-right to access more features, including switching the chat to full-screen view and sharing your screen – which will allow guests to see what you’re doing on Raspberry Pi, including any applications or documents you have open.

06 Adjust microphone volume

If your microphone is too quiet, you’ll need to adjust the volume. Click the Terminal icon at the upper-left of the screen, then type alsamixer followed by the ENTER key. This loads an audio mixing tool; when it opens, press F4 to switch to the Capture tab and use the up-arrow and down-arrow keys on the keyboard to increase or decrease the volume. Try small adjustments at first; setting the capture volume too high can cause the audio to ‘clip’, making you harder to hear. When finished, press CTRL+C to exit AlsaMixer, then click the X at the top-right of the Terminal to close it.

Adjust your audio volume settings with the AlsaMixer tool

Work online with your team

Just because you’re not shoulder-to-shoulder with colleagues doesn’t mean you can’t collaborate, thanks to these online tools.

Google Docs

Google Docs is a suite of online productivity tools linked to the Google Drive cloud storage platform, all accessible directly from your browser. Open the browser and go to drive.google.com, then sign in with your Google account – or sign up for a new account if you don’t already have one – for 15GB of free storage plus access to the word processor Google Docs, spreadsheet Google Sheets, presentation tool Google Slides, and more. Connect with colleagues and friends to share files or entire folders, and collaborate within documents with simultaneous multi-user editing, comments, and change suggestions.

Slack

Designed for business, Slack is a text-based instant messaging tool with support for file transfer, rich text, images, video, and more. Slack allows for easy collaboration in Teams, which are then split into multiple channels or rooms – some for casual conversation, others for more focused discussion. If your colleagues or friends already have a Slack team set up, ask them to send you an invite; if not, you can head to app.slack.com and set one up yourself for free.

Discord

Built more for casual use, Discord offers live chat functionality. While the dedicated Discord app includes voice chat support, this is not yet supported on Raspberry Pi – but you can still use text chat by opening the browser, going to discord.com, and choosing the ‘Open Discord in your browser’ option. Choose a username, read and agree to the terms of service, then enter an email address and password to set up your own free Discord server. Alternatively, if you know someone on Discord already, ask them to send you an invitation to access their server.

Firefox Send

If you need to send a document, image, or any other type of file to someone who isn’t on Google Drive, you can use Firefox Send – even if you’re not using the Firefox browser. All files transferred via Firefox Send are encrypted, and can be protected with an optional password, and are automatically deleted after a set number of downloads or length of time. Simply open the browser and go to send.firefox.com; you can send files up to 1GB without an account, or sign up for a free Firefox account to increase the limit to 2.5GB.

GitHub

For programmers, GitHub is a lifesaver. Based around the Git version control system, GitHub lets teams work on a project regardless of distance using repositories of source code and supporting files. Each programmer can have a local copy of the program files, work on them independently, then submit the changes for inclusion in the master copy – complete with the ability to handle conflicting changes. Better still, GitHub offers additional collaboration tools including issue tracking. Open the browser and go to github.com to sign up, or sign in if you have an existing account, and follow the getting started guide on the site.

Read The MagPi for free!

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

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

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

The post How to work from home with Raspberry Pi | The Magpi 93 appeared first on Raspberry Pi.

❌