Schlagwort: Sense HAT

  • Nearly 15,000 young people ran their code on the ISS for Astro Pi 2020/21!

    Nearly 15,000 young people ran their code on the ISS for Astro Pi 2020/21!

    Reading Time: 4 minutes

    Our team here at the Raspberry Pi Foundation, in collaboration with ESA Education, is excited to announce the successful deployment of young people’s programs aboard the International Space Station (ISS) for the European Astro Pi Challenge 2020/21!

    Logo of the European Astro Pi Challenge.

    Across both Astro Pi missions — Mission Zero and Mission Space Lab — 14,993 participants created an amazing 9408 programs, which have now run aboard the ISS’s two special Raspberry Pi computers: the Astro Pis Izzy and Ed. Congratulations to all for their achievements during this challenging year!

    [youtube https://www.youtube.com/watch?v=rSVzOvDiJnM?feature=oembed&w=500&h=281]

    ESA astronaut Thomas Pesquet congratulates all of this year’s Astro Pi teams

    Mission Zero: Popular as ever

    This year, 14,054 young people from 24 countries successfully took part in Mission Zero: the Astro Pi computers aboard the ISS ran their programs for 30 seconds each.

    In Mission Zero, young people write programs to measure the humidity inside the ISS Columbus module using the Sense HAT add-on of the Astro Pi, and then use the Sense HAT’s LED matrix to display the measurement together with their very own message to the astronauts. This year that included ESA astronaut Thomas Pesquet, who oversaw the deployment of both the Mission Zero and Mission Space Lab programs.

    [youtube https://www.youtube.com/watch?v=279y5U9TXgY?feature=oembed&w=500&h=281]

    This year’s Mission Zero programs running aboard the ISS

    To make it easier for young people to participate in Mission Zero while school closures and restrictions on face-to-face meetings were in place to help stop the spread of coronavirus, we updated the Mission Zero rules this year: for the first time, young people could take part by themselves as well as in teams. As we had hoped, this new option proved hugely popular, with 6308 entries coming from individual participants. Despite the challenging circumstances, this year’s number of Mission Zero participants was just 5% lower than last year’s — a sure sign of how much young people love Astro Pi!

    Mission Space Lab: Investigating life in space and on Earth

    In addition to the Mission Zero participants, 232 teams of in total 939 students and young people are currently in their final phase of Astro Pi Mission Space Lab. Over the last month, each team had the program for their scientific experiment run on either Astro Pi Ed or Astro Pi Izzy for three hours each.

    Compilation of photographs of Earth, taken by Astro Pi Izzy aboard the ISS.
    Photographs of Earth, taken by Astro Pi Izzy aboard the ISS

    Teams conducting ‘Life on Earth’ experiments used Astro Pi Izzy’s near-infrared camera to capture images of the planet’s surface. Their experiments include predicting weather patterns by analysing cloud formations, assessing the impact of climate change by investigating reductions in vegetation cover over time using NDVI, and studying variations in the Earth’s magnetic field.

    Teams conducting ‘Life in space’ experiments used Astro Pi Ed’s sensors to investigate life inside the ISS Columbus module. Their experiments include measuring the direction and force of gravity inside the Space Station, analysing the air quality onboard, and calculating the position and direction of the Space Station in orbit.

    All Mission Space Lab teams have now received their data back from the ISS so they can analyse it and summarise their findings in their final scientific reports. To grant teams enough time to complete their reports while social distancing measures may be in place, we have extended the submission deadline to 12 pm (noon) BST on Monday 28 June 2021!

    It’s cosy inside the ISS!

    Despite its relatively large size of 109 metres, the ISS only has enough sleeping pods for seven astronauts. However, sometimes there can be more than seven astronauts onboard: usually when one group prepares to leave as another arrives. Recently, a whole eleven astronauts were aboard the ISS, which meant that they had to get creative about where to settle down for sleep.

    For Ed and Izzy, our Astro Pi computers, a large crowd such as this can cause some complications! For one thing, ‘crew bumping’ is more likely, which is when the USB cable connecting an Astro Pi to power can become accidentally unplugged because an astronaut collides with it in the small space of the Columbus module. And this time, the snug sleeping situation made one of the crew members request permission to cover Astro Pi Ed’s LED display during the ‘night’! Why? The astronaut was ‘bedding down’ directly opposite Ed, and the light from the display was making sleep difficult! That just goes to show that, even in space, it’s really best to avoid bright light if you need a good night’s sleep.

    ESA Astronaut Thomas Pesquet with the Astro Pi computers onboard the ISS.
    ESA astronaut Thomas Pesquet with the Astro Pi computers aboard the ISS

    Who will win Mission Space Lab 2020/21?

    We and our collaborators at ESA Education have appointed a jury of experts to judge all the Mission Space Lab Phase 4 final reports and select the 10 teams with the best reports as the winners of the 2020/21 round of Mission Space Lab. Each of the 10 winning teams will receive a special prize: an invitation to a webinar with an ESA astronaut where they can directly ask them their questions about life in space!

    Congratulations again to all the teams that have taken part in the European Astro Pi Challenge this year. Mission Space Lab teams, we can’t wait to read your reports!

    Website: LINK

  • Let’s make it colourful with Digital Making at Home

    Let’s make it colourful with Digital Making at Home

    Reading Time: < 1 minute

    [youtube https://www.youtube.com/watch?v=OOFlKcCEOvk?feature=oembed&w=500&h=281]

    Join us for Digital Making at Home: this week, young people can learn about using the Sense HAT — or its emulator — 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 do some colourful coding 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.

    Website: LINK

  • Pulling Raspberry Pi translation data from GitHub

    Pulling Raspberry Pi translation data from GitHub

    Reading Time: 5 minutes

    What happens when you give two linguists jobs at Raspberry Pi? They start thinking they can do digital making, even though they have zero coding skills! Because if you don’t feel inspired to step out of your comfort zone here — surrounded by all the creativity, making, and technology — then there is no hope you’ll be motivated to do it anywhere else.

    two smiling women standing in front of a colourful wall

    Maja and Nina, our translation team, and coding beginners

    Maja and I support the community of Raspberry Pi translation volunteers, and we wanted to build something to celebrate them and the amazing work they do! Our educational content is already available in 26 languages, with more than 400 translations on our projects website. But our volunteer community is always translating more content, and so off we went, on an ambitious (by our standards!) mission to create a Raspberry Pi–powered translation notification system. This is a Raspberry Pi that pulls GitHub data to display a message on a Sense HAT and play a tune whenever we add fresh translated content to the Raspberry Pi projects website!

    Breaking it down

    There were three parts to the project: two of them were pretty easy (displaying a message on a Sense HAT and playing a tune), and one more challenging (pulling information about new translated content added to our repositories on GitHub). We worked on each part separately and then put all of the code together.

    Two computers and two pastries

    Mandatory for coding: baked goods and tea

    Displaying a message on Sense HAT and playing a sound

    We used the Raspberry Pi projects Getting started with the Sense HAT and GPIO music box to help us with this part of our build.

    At first we wanted the Sense HAT to display fireworks, but we soon realised how bad we both are at designing animations, so we moved on to displaying a less creative but still satisfying smiley face, followed by a message saying “Hooray! Another translation!” and another smiley face. LED screen displaying the message 'Another translation!'

    We used the sense_hat and time modules, and wrote a function that can be easily used in the main body of the program. You can look at the comments in the code above to see what each line does:

    Python code snippet for displaying a message on a Sense HAT

    So we could add the fun tune, we learned how to use the Pygame library to play sounds. Using Pygame it’s really simple to create a function that plays a sound: once you have the .wav file in your chosen location, you simply import and initialise the pygame module, create a Sound object, and provide it with the path to your .wav file. You can then play your sound:

    Python code snippet for playing a sound

    We’ve programmed our translation notification system to play the meow sound three times, using the sleep function to create a one-second break between each sound. Because why would you want one meow if you can have three?

    Pulling repository information from GitHub

    This was the more challenging part for Maja and me, so we asked for help from experienced programmers, including our colleague Ben Nuttall. We explained what we wanted to do: pull information from our GitHub repositories where all the projects available on the Raspberry Pi projects website are kept, and every time a new language directory is found, to execute the sparkles and meow functions to let us and EVERYONE in the office know that we have new translations! Ben did a bit of research and quickly found the PyGithub library, which enables you to manage your GitHub resources using Python scripts.

    Python code snippet for pulling data from GitHub

    Check out the comments to see what the code does

    The script runs in an infinite loop, checking all repositories in the ‘raspberrypilearning’ organisation for new translations (directories with names in form of xx-XX, eg. fr-CA) every 60 minutes. Any new translation is then printed and preserved in memory. We had some initial issues with the usage of the PyGithub library: calling .get_commits() on an empty repository throws an exception, but the library doesn’t provide any functions to check whether a repo is empty or not. Fortunately, wrapping this logic in a try...except statement solved the problem.

    And there we have it: success!

    Demo of our Translation Notification System build

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

    Our ideas for further development

    We’re pretty proud that the whole Raspberry Pi office now hears a meowing cat whenever new translated content is added to our projects website, but we’ve got plans for further development of our translation notification system. Our existing translated educational resources have already been viewed by over 1 million users around the world, and we want anyone interested in the translations our volunteers make possible to be able to track new translated projects as the go live!

    One way to do that is to modify the code to tweet or send an email with the name of the newly added translation together with a link to the project and information on the language in which it was added. Alternatively, we could adapt the system to only execute the sparkles and meow functions when a translation in a particular language is added. Then our more than 1000 volunteers, or any learner using our translations, could set up their own Raspberry Pi and Sense HAT to receive notifications of content in the language that interests them, rather than in all languages.

    We need your help

    Both ideas pose a pretty big challenge for the inexperienced new coders of the Raspberry Pi translation team, so we’d really appreciate any tips you have for helping us get started or for improving our existing system! Please share your thoughts in the comments below.

    Website: LINK

  • Raspberry Pi Sense HAT impact recorder for your car

    Raspberry Pi Sense HAT impact recorder for your car

    Reading Time: 2 minutes

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

    Raspberry Pi Sense HAT

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

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

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

    Impact Recorder for Vehicles

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

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

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

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

    Website: LINK

  • Playing Snake on a Raspberry Pi word clock

    Playing Snake on a Raspberry Pi word clock

    Reading Time: < 1 minute

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

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

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

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

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

    Until tomorrow, fair reader, adieu.

    Website: LINK

  • Raspberry Pi captures a Soyuz in space!

    Raspberry Pi captures a Soyuz in space!

    Reading Time: 2 minutes

    So this happened. And we are buzzing!

    You’re most likely aware of the Astro Pi Challenge. In case you’re not, it’s a wonderfully exciting programme organised by the European Space Agency (ESA) and us at Raspberry Pi. Astro Pi challenges European young people to write scientific experiments in code, and the best experiments run aboard the International Space Station (ISS) on two Astro Pi units: Raspberry Pi 1 B+ and Sense HATs encased in flight-grade aluminium spacesuits.

    It’s very cool. So, so cool. As adults, we’re all extremely jealous that we’re unable to take part. We all love space and, to be honest, we all want to be astronauts. Astronauts are the coolest.

    So imagine our excitement at Pi Towers when ESA shared this photo on Friday:

    This is a Soyuz vehicle on its way to dock with the International Space Station. And while Soyuz vehicles ferry between earth and the ISS all the time, what’s so special about this occasion is that this very photo was captured using a Raspberry Pi 1 B+and a Raspberry Pi Camera Module, together known as Izzy, one of the Astro Pi units!

    So if anyone ever asks you whether the Raspberry Pi Camera Module is any good, just show them this photo. We don’t think you’ll need to provide any further evidence after that.

    Website: LINK

  • IBM Q System One quantum computing on a Raspberry Pi?

    IBM Q System One quantum computing on a Raspberry Pi?

    Reading Time: 2 minutes

    IBM Q System One: the world’s first commercial, integrated, universal, approximate quantum computing system…

    …on a Raspberry Pi?

    What is a quantum computing system?

    An excellent question and, while some of you may know the answer, here is Kurzgesagt‘s ‘in a nutshell’ explanation of quantum computing for the rest of us:

    Quantum Computers Explained – Limits of Human Technology

    Where are the limits of human technology? And can we somehow avoid them? This is where quantum computers become very interesting.

    Qrasp — quantum computing on a Raspberry Pi

    After seeing a press announcement for IBM’s Q System One, the first-ever commercial quantum computer, IBM Q Ambassador Hassi Norlen decided he wanted his own, and reached for his trusty Raspberry Pi to build one.

    “This will not be easy,” he admits on his Medium blog post for the Qrasp project. “IBM Q System One is, after all, a cloud-based quantum computing offering, with the main hardware, cryostats, quantum chips, and all locked away in the IBM labs.”

    Hassi goes on to explain the list of required ingredients for building your own Qrasp, including the Raspberry Pi Sense HAT, and the programs one can run on the finished device.

    Qrasp

    Qiskit interface for Raspberry PI with SenseHat

    It’s a great blog post, and to save me summarising it here, check it out for yourself. You’ll also find a link to the GitHub repo for Qrasp, and other tidbits of information on making the most out of the final build.

    Website: LINK

  • Simulate sand with Adafruit’s newest project

    Simulate sand with Adafruit’s newest project

    Reading Time: 3 minutes

    The Ruiz brothers at Adafruit have used Phillip Burgess’s PixieDust code to turn a 64×64 LED Matrix and a Raspberry Pi Zero into an awesome sand toy that refuses to defy the laws of gravity. Here’s how to make your own.

    BIG LED Sand Toy – Raspberry Pi RGB LED Matrix

    Simulated LED Sand Physics! These LEDs interact with motion and looks like they’re affect by gravity. An Adafruit LED matrix displays the LEDs as little grains of sand which are driven by sampling an accelerometer with Raspberry Pi Zero!

    Obey gravity

    As the latest addition to their online learning system, Adafruit have produced the BIG LED Sand Toy, or as I like to call it, Have you seen this awesome thing Adafuit have made?

    Adafruit Sand Toy Raspberry Pi

    The build uses a Raspberry Pi Zero, a 64×64 LED matrix, the Adafruit RGB Matrix Bonnet, 3D-printed parts, and a few smaller peripherals. Find the entire tutorial, including downloadable STL files, on their website.

    How does it work?

    Alongside the aforementioned ingredients, the project utilises the Adafruit LIS3DH Triple-Axis Accelerometer. This sensor is packed with features, and it allows the Raspberry Pi to control the virtual sand depending on how the toy is moved.

    Adafruit Sand Toy Raspberry Pi

    The Ruiz brothers inserted an SD card loaded with Raspbian Lite into the Raspberry Pi Zero, installed the LED Matrix driver, cloned the Adafruit_PixieDust library, and then just executed the code. They created some preset modes, but once you’re comfortable with the project code, you’ll be able to add your own take on the project.

    Accelerometers and Raspberry Pi

    This isn’t the first time a Raspberry Pi has met an accelerometer: the two Raspberry Pis aboard the International Space Station for the Astro Pi mission both have accelerometers thanks to their Sense HATs.

    Comprised of a bundle of sensors, an LED matrix, and a five-point joystick, the Sense HAT is a great tool for exploring your surroundings with the Raspberry Pi, as well as for using your surroundings to control the Pi. You can find a whole variety of Sense HAT–based projects and tutorials on our website.

    Raspberry Pi Sense HAT Slug free resource

    And if you’d like to try out the Sense HAT, including its onboard accelerometer, without purchasing one, head over to our online emulator, or use the emulator preinstalled on Raspbian.

    Website: LINK

  • Create SLUG! It’s just like Snake, but with a slug

    Create SLUG! It’s just like Snake, but with a slug

    Reading Time: 3 minutes

    Recreate Snake, the favourite mobile phone game from the late nineties, using a slug*, a Raspberry Pi, a Sense HAT, and our free resource!

    Raspberry Pi Sense HAT Slug free resource

    *A virtual slug. Not a real slug. Please leave the real slugs out in nature.

    Snake SLUG!

    Move aside, Angry Birds! On your bike, Pokémon Go! When it comes to the cream of the crop of mobile phone games, Snake holds the top spot.

    Snake Nokia Game

    I could while away the hours…

    You may still have an old Nokia 3310 lost in the depths of a drawer somewhere — the drawer that won’t open all the way because something inside is jammed at an odd angle. So it will be far easier to grab your Pi and Sense HAT, or use the free Sense HAT emulator (online or on Raspbian), and code Snake SLUG yourself. In doing so, you can introduce the smaller residents of your household to the best reptile-focused game ever made…now with added mollusc.

    The resource

    To try out the game for yourself, head to our resource page, where you’ll find the online Sense HAT emulator embedded and ready to roll.

    Raspberry Pi Sense HAT Slug free resource

    It’ll look just like this, and you can use your computer’s arrow keys to direct your slug toward her tasty treats.

    From there, you’ll be taken on a step-by-step journey from zero to SLUG glory while coding your own versionof the game in Python. On the way, you’ll learn to work with two-dimensional lists and to use the Sense HAT’s pixel display and joystick input. And by completing the resource, you’ll expand your understanding of applying abstraction and decomposition to solve more complex problems, in line with our Digital Making Curriculum.

    The Sense HAT

    The Raspberry Pi Sense HAT was originally designed and made as part of the Astro Pi mission in December 2015. With an 8×8 RGB LED matrix, a joystick, and a plethora of on-board sensors including an accelerometer, gyroscope, and magnetometer, it’s a great add-on for your digital making toolkit, and excellent for projects involving data collection and evaluation.

    You can find more of our free Sense HAT tutorials here, including for making Flappy Bird Astronaut, a marble maze, and Pong.

    Website: LINK