Tag Archives: astro pi

Sense HAT Emulator Upgrade

via Raspberry Pi

Last year, we partnered with Trinket to develop a web-based emulator for the Sense HAT, the multipurpose add-on board for the Raspberry Pi. Today, we are proud to announce an exciting new upgrade to the emulator. We hope this will make it even easier for you to design amazing experiments with the Sense HAT!

What’s new?

The original release of the emulator didn’t fully support all of the Sense HAT features. Specifically, the movement sensors were not emulated. Thanks to funding from the UK Space Agency, we are delighted to announce that a new round of development has just been completed. From today, the movement sensors are fully supported. The emulator also comes with a shiny new 3D interface, Astro Pi skin mode, and Pygame event handling. Click the ▶︎ button below to see what’s new!

Upgraded sensors

On a physical Sense HAT, real sensors react to changes in environmental conditions like fluctuations in temperature or humidity. The emulator has sliders which are designed to simulate this. However, emulating the movement sensor is a bit more complicated. The upgrade introduces a 3D slider, which is essentially a model of the Sense HAT that you can move with your mouse. Moving the model affects the readings provided by the accelerometer, gyroscope, and magnetometer sensors.

Code written in this emulator is directly portable to a physical Raspberry Pi and Sense HAT without modification. This means you can now develop and test programs using the movement sensors from any internet-connected computer, anywhere in the world.

Astro Pi mode

Astro Pi is our series of competitions offering students the chance to have their code run in space! The code is run on two space-hardened Raspberry Pi units, with attached Sense HATs, on the International Space Station.

Image of Astro Pi unit Sense HAT emulator upgrade

Astro Pi skin mode

There are a number of practical things that can catch you out when you are porting your Sense HAT code to an Astro Pi unit, though, such as the orientation of the screen and joystick. Just as having a 3D-printed Astro Pi case enables you to discover and overcome these, so does the Astro Pi skin mode in this emulator. In the bottom right-hand panel, there is an Astro Pi button which enables the mode: click it again to go back to the Sense HAT.

The joystick and push buttons are operated by pressing your keyboard keys: use the cursor keys and Enter for the joystick, and U, D, L, R, A, and B for the buttons.

Sense Hat resources for Code Clubs

Image of gallery of Code Club Sense HAT projects Sense HAT emulator upgrade

Click the image to visit the Code Club projects page

We also have a new range of Code Club resources which are based on the emulator. Of these, three use the environmental sensors and two use the movement sensors. The resources are an ideal way for any Code Club to get into physical computing.

The technology

The 3D models in the emulator are represented entirely with HTML and CSS. “This project pushed the Trinket team, and the 3D web, to its limit,” says Elliott Hauser, CEO of Trinket. “Our first step was to test whether pure 3D HTML/CSS was feasible, using Julian Garnier’s Tridiv.”

Sense HAT 3D image mockup Sense HAT emulator upgrade

The Trinket team’s preliminary 3D model of the Sense HAT

“We added JavaScript rotation logic and the proof of concept worked!” Elliot continues. “Countless iterations, SVG textures, and pixel-pushing tweaks later, the finished emulator is far more than the sum of its parts.”

Sense HAT emulator 3d image final version Sense HAT emulator upgrade

The finished Sense HAT model: doesn’t it look amazing?

Check out this blog post from Trinket for more on the technology and mathematics behind the models.

One of the compromises we’ve had to make is browser support. Unfortunately, browsers like Firefox and Microsoft Edge don’t fully support this technology yet. Instead, we recommend that you use Chrome, Safari, or Opera to access the emulator.

Where do I start?

If you’re new to the Sense HAT, you can simply copy and paste many of the code examples from our educational resources, like this one. Alternatively, you can check out our Sense HAT Essentials e-book. For a complete list of all the functions you can use, have a look at the Sense HAT API reference here.

The post Sense HAT Emulator Upgrade appeared first on Raspberry Pi.

European Astro Pi Challenge winners

via Raspberry Pi

In October last year, with the European Space Agency and CNES, we launched the first ever European Astro Pi challenge. We asked students from all across Europe to write code for the flight of French ESA astronaut Thomas Pesquet to the International Space Station (ISS) as part of the Proxima mission. Today, we are very excited to announce the winners! First of all, though, we have a very special message from Thomas Pesquet himself, which comes all the way from space…

Thomas Pesquet congratulates Astro Pi participants from space

French ESA astronaut Thomas Pesquet floats in to thank all participants in the European Astro Pi challenge. In October last year, together with the European Space Agency, we launched the first ever European Astro Pi challenge for the flight of French ESA astronaut Thomas Pesquet to the International Space Station (ISS) as part of mission Proxima.

Thomas also recorded a video in French: you can click here to see it and to enjoy some more of his excellent microgravity acrobatics.

A bit of background

This year’s competition expands on our previous work with British ESA astronaut Tim Peake, in which, together with the UK Space Agency and ESA, we invited UK students to design software experiments to run on board the ISS.

Astro Pi Vis (AKA Ed) on board the ISS. Image from ESA.

In 2015, we built two space-hardened Raspberry Pi units, or Astro Pis, to act as the platform on which to run the students’ code. Affectionately nicknamed Ed and Izzy, the units were launched into space on an Atlas V rocket, arriving at the ISS a few days before Tim Peake. He had a great time running all of the programs, and the data collected was transmitted back to Earth so that the winners could analyse their results and share them with the public.

The European challenge provides the opportunity to design code to be run in space to school students from every ESA member country. To support the participants, we worked with ESA and CPC to design, manufacture, and distribute several hundred free Astro Pi activity kits to the teams who registered. Further support for teachers was provided in the form of three live webinars, a demonstration video, and numerous free educational resources.

Image of Astro Pi kit box

The Astro Pi activity kit used by participants in the European challenge.

The challenge

Thomas Pesquet assigned two missions to the teams:

  • A primary mission, for which teams needed to write code to detect when the crew are working in the Columbus module near the Astro Pi units.
  • A secondary mission, for which teams needed to come up with their own scientific investigation and write the code to execute it.

The deadline for code submissions was 28 February 2017, with the judging taking place the following week. We can now reveal which schools will have the privilege of having their code uploaded to the ISS and run in space.

The proud winners!

Everyone produced great work and the judges found it really tough to narrow the entries down. In addition to the winning submissions, there were a number of teams who had put a great deal of work into their projects, and whose entries have been awarded ‘Highly Commended’ status. These teams will also have their code run on the ISS.

We would like to say a big thank you to everyone who participated. Massive congratulations are due to the winners! We will upload your code digitally using the space-to-ground link over the next few weeks. Your code will be executed, and any files created will be downloaded from space and returned to you via email for analysis.

In no particular order, the winners are:

France

  • Winners
    • @stroteam, Institut de Genech, Hauts-de-France
    • Wierzbinski, École à la maison, Occitanie
    • Les Marsilyens, École J. M. Marsily, PACA
    • MauriacSpaceCoders, Lycée François Mauriac, Nouvelle-Aquitaine
    • Ici-bas, École de Saint-André d’Embrun, PACA
    • Les Astrollinaires, Lycée général et technologique Guillaume Apollinaire, PACA
  • Highly Commended
    • ALTAÏR, Lycée Albert Claveille, Nouvelle Aquitaine
    • GalaXess Reloaded, Lycée Saint-Cricq, Nouvelle Aquitaine
    • Les CM de Neffiès, École Louis Authie, Occitanie
    • Équipe Sciences, Collège Léonce Bourliaguet, Nouvelle Aquitaine
    • Maurois ICN, Lycée André Maurois, Normandie
    • Space Project SP4, Lycée Saint-Paul IV, Île de la Réunion
    • 4eme2 Gymnase Jean Sturm, Gymnase Jean Sturm, Grand Est
    • Astro Pascal dans les étoiles, École Pascal, Île-de-France
    • les-4mis, EREA Alexandre Vialatte, Auvergne-Rhône-Alpes
    • Space Cavenne Oddity, École Cavenne, Auvergne-Rhône-Alpes
    • Luanda for Space, Lycée Français de Luanda, Angola
      (Note: this is a French international school and the team members have French nationality/citizenship)
    • François Detrille, Lycée Langevin-Wallon, Île-de-France

Greece

  • Winners
    • Delta, TALOS ed-UTH-robotix, Magnesia
    • Weightless Mass, Intercultural Junior High School of Evosmos, Macedonia
    • 49th Astro Pi Teamwork, 49th Elementary School of Patras, Achaia
    • Astro Travellers, 12th Primary School of Petroupolis, Attiki
    • GKGF-1, Gymnasium of Kanithos, Sterea Ellada
  • Highly Commended
    • AstroShot, Lixouri High School, Kefalonia
    • Salamina Rockets Pi, 1st Senior High School of Salamina, Attiki
    • The four Astro-fans, 6th Gymnasio of Veria, Macedonia
    • Samians, 2nd Gymnasio Samou, North Eastern Aegean

United Kingdom

  • Winners
    • Madeley Ad Astra, Madeley Academy, Shropshire
    • Team Dexterity, Dyffryn Taf School, Carmarthenshire
    • The Kepler Kids, St Nicolas C of E Junior School, Berkshire
    • Catterline Pi Bugs, Catterline Primary, Aberdeenshire
    • smileyPi, Westminster School, London
  • Highly Commended
    • South London Raspberry Jam, South London Raspberry Jam, London

Italy

  • Winners
    • Garibaldini, Istituto Comprensivo Rapisardi-Garibaldi, Sicilia
    • Buzz, IIS Verona-Trento, Sicilia
    • Water warmers, Liceo Scientifico Galileo Galilei, Abruzzo
    • Juvara/Einaudi Siracusa, IIS L. Einaudi, Sicilia
    • AstroTeam, IIS Arimondi-Eula, Piemonte

Poland

  • Winners
    • Birnam, Zespół Szkoły i Gimnazjum im. W. Orkana w Niedźwiedziu, Malopolska
    • TechnoZONE, Zespół Szkół nr 2 im. Eugeniusza Kwiatkowskiego, Podkarpacie
    • DeltaV, Gimnazjum nr 49, Województwo śląskie
    • The Safety Crew, MZS Gimnazjum nr 1, Województwo śląskie
    • Warriors, Zespół Szkół Miejskich nr 3 w Jaśle, Podkarpackie
  • Highly Commended
    • The Young Cuiavian Astronomers, Gimnazjum im. Stefana Kardynała Wyszyńskiego w Piotrkowie Kujawskim, Kujawsko-pomorskie
    • AstroLeszczynPi, I Liceum Ogolnokształcace w Jasle im. Krola Stanislawa Leszczynskiego, Podkarpackie

Portugal

  • Winners
    • Sampaionautas, Escola Secundária de Sampaio, Setúbal
    • Labutes Pi, Escola Secundária D. João II, Setúbal
    • AgroSpace Makers, EB 2/3 D. Afonso Henriques, Cávado
    • Zero Gravity, EB 2/3 D. Afonso Henriques, Cávado
    • Lua, Agrupamento de Escolas José Belchior Viegas, Algarve

Romania

  • Winners
    • AstroVianu, Tudor Vianu National High School of Computer Science, Bucharest
    • MiBus Researchers, Mihai Busuioc High School, Iași
    • Cosmos Dreams, Nicolae Balcescu High School, Cluj
    • Carmen Sylva Astro Pi, Liceul Teoretic Carmen Sylva Eforie, Constanța
    • Stargazers, Tudor Vianu National High School of Computer Science, Bucharest

Spain

  • Winners
    • Papaya, IES Sopela, Vizcaya
    • Salesianos-Ubeda, Salesianos Santo Domingo Savio, Andalusia
    • Valdespartans, IES Valdespartera, Aragón
    • Ins Terrassa, Institut Terrassa, Cataluña

Ireland

  • Winner
    • Moonty1, Mayfield Community School, Cork

Germany

  • Winner
    • BSC Behringersdorf Space Center, Labenwolf-Gymnasium, Bayern

Norway

  • Winner
    • Skedsmo Kodeklubb, Kjeller Skole, Akershus

Hungary

  • Winner
    • UltimaSpace, Mihaly Tancsics Grammar School of Kaposvár, Somogy

Belgium

  • Winner
    • Lambda Voyager, Stedelijke Humaniora Dilsen, Limburg

FAQ

Why aren’t all 22 ESA member states listed?

  • Because some countries did not have teams participating in the challenge.

Why do some countries have fewer than five teams?

  • Either because those countries had fewer than five teams qualifying for space flight, or because they had fewer than five teams participating in the challenge.

How will I get my results back from space?

  • After your code has run on the ISS, we will download any files you created and they will be emailed to your teacher.

The post European Astro Pi Challenge winners appeared first on Raspberry Pi.

Hour of Code 2016

via Raspberry Pi

What could you do in an hour? Perhaps you could watch an episode of a TV show, have a luxurious bath, or even tidy the house a bit! But what if you could spend an hour learning a skill that might influence the future of your career, and perhaps your whole life?

hour-of-code-header

The Hour of Code is a worldwide initiative which aims to get as many people as possible to have a go at programming computers. Our aim is to put digital making into the hands of as many people as possible, so here at Pi Towers we have cooked up some exciting projects for you to try, all of which can be completed in an hour.

Have a go at making a version of a whoopee cushion (a favourite Christmas cracker toy in my house) using physical computing, invent your own lyrics for The Twelve Days of Christmas, or simulate your cat floating in space. Many of the projects don’t even require a Raspberry Pi: you can get started with Scratch just by visiting a website.

Physical computing projects

Physical computing projects Make a fast-paced reaction game with a Pi and an Explorer HAT

Scratch projects

Ada's Poetry Generator Program your own animation in Scratch

Astro Pi projects

Sense HAT Random Sparkles Simulate the effects of weightlessness in space using Scratch

Programming projects

N days of Christmas Generate cat memes with JavaScript



We are also holding a digital making event at Pi Towers on Wednesday 7 December: if you can travel to Cambridge, then register, join in and achieve your hour of code!

Whether you are a child or an adult, it is never too late to start learning to code. When I was a teacher, I always loved participating in the Hour of Code: the students couldn’t quite believe they were given an hour to do something they would willingly do for fun. What they didn’t know is that the teachers secretly had a lot of fun testing out the projects too, although some of the resulting sounds did cause a few raised eyebrows in the staff room!

Once you’ve started coding, you might not want to stop, so head over to our resources section for more inspirational projects to tackle. Intrepid teachers can download the second issue of the MagPi Educator’s Edition to find out how to take things further in the classroom. The sky’s the limit! Well, actually, if you’re doing one of our Astro Pi projects, space is the limit…

The post Hour of Code 2016 appeared first on Raspberry Pi.

Hour of Code 2016

via Raspberry Pi

What could you do in an hour? Perhaps you could watch an episode of a TV show, have a luxurious bath, or even tidy the house a bit! But what if you could spend an hour learning a skill that might influence the future of your career, and perhaps your whole life?

hour-of-code-header

The Hour of Code is a worldwide initiative which aims to get as many people as possible to have a go at programming computers. Our aim is to put digital making into the hands of as many people as possible, so here at Pi Towers we have cooked up some exciting projects for you to try, all of which can be completed in an hour.

Have a go at making a version of a whoopee cushion (a favourite Christmas cracker toy in my house) using physical computing, invent your own lyrics for The Twelve Days of Christmas, or simulate your cat floating in space. Many of the projects don’t even require a Raspberry Pi: you can get started with Scratch just by visiting a website.

Physical computing projects

Physical computing projects Make a fast-paced reaction game with a Pi and an Explorer HAT

Scratch projects

Ada's Poetry Generator Program your own animation in Scratch

Astro Pi projects

Sense HAT Random Sparkles Simulate the effects of weightlessness in space using Scratch

Programming projects

N days of Christmas Generate cat memes with JavaScript



We are also holding a digital making event at Pi Towers on Wednesday 7 December: if you can travel to Cambridge, then register, join in and achieve your hour of code!

Whether you are a child or an adult, it is never too late to start learning to code. When I was a teacher, I always loved participating in the Hour of Code: the students couldn’t quite believe they were given an hour to do something they would willingly do for fun. What they didn’t know is that the teachers secretly had a lot of fun testing out the projects too, although some of the resulting sounds did cause a few raised eyebrows in the staff room!

Once you’ve started coding, you might not want to stop, so head over to our resources section for more inspirational projects to tackle. Intrepid teachers can download the second issue of the MagPi Educator’s Edition to find out how to take things further in the classroom. The sky’s the limit! Well, actually, if you’re doing one of our Astro Pi projects, space is the limit…

The post Hour of Code 2016 appeared first on Raspberry Pi.

Announcing the first ever European Astro Pi Challenge!

via Raspberry Pi

Astro_Pi_Logo_WEB-300px

Right now, 400km above the Earth aboard the International Space Station, are two very special pieces of hardware. Two Raspberry Pi computers are currently orbiting our planet, each equipped with a Sense HAT, a camera and a special aluminium flight case – and children all over Europe have the chance to program them.

Astro_Pi_1-01

Last year, in collaboration with the European Space Agency and the UK Space Agency, we ran a competition that allowed students all over the UK to design experiments to run on the Astro Pi units. We sent their code into space with British ESA astronaut Tim Peake, who had a great time running all their programs. The data collected was then transmitted back down to Earth, so the winners of the competition – and everyone else – could analyse the results of their experiments as well.

Tim is safely back on Earth now, but French ESA Astronaut Thomas Pesquet is soon launching to the ISS, and he’s keen to see what students from all over Europe can do with the Astro Pi units too. So ESA, together with the Raspberry Pi Foundation, are launching a brand-new Astro Pi Challenge, and this time it’s open to children from every ESA member country.

Earthlights 2002

Children from across Europe can enter the European Astro Pi Challenge
Photo: Earthlights 2002 by NASA

This is an amazing opportunity for students all over Europe. What better way to learn about computing, science, and space than actually being able to run your very own experiments on board the International Space Station? Imagine being able to say that you played a part in a real ESA mission, that programs you wrote were executed in orbit, and that results from your experiments were analysed by children all over the world!

Astro Pi Mission

This is “Astro Pi Mission” by raspberrypi on Vimeo, the home for high quality videos and the people who love them.

If you’re a teacher or a student from an ESA member country, this is how you can take part:

  1. Assemble your mission team, which must include at least one support teacher as well as students under the age of 16.
  2. Use the Mission Plan Template to design a sample mission that showcases your approach to running a space mission, and demonstrates that you can break down your big idea into specific steps. Note that you don’t need to address the challenge at this stage. Submit your mission plan and register your participation**.
  3. If you’re picked to continue to the next phase, you will receive an Astro Pi kit and a mission challenge designed by Thomas Pesquet to test your team’s ingenuity and skills.
  4. If your solutions are picked, then your code will be beamed up to the ISS, installed on the Astro Pi units, and run by Thomas Pesquet.

To help you learn all about the Astro Pi units and gain the skills to use a Raspberry Pi equipped with a Sense HAT, we have a variety of resources that you can begin to work your way through. Just go to our resources section and have a look through the Astro Pi and Sense HAT resources. Even if you don’t have a Sense HAT yourself, you can still learn how to use one with either the stand-alone, desktop Sense HAT emulator or Trinket’s web-based emulator.

** Related links:

The post Announcing the first ever European Astro Pi Challenge! appeared first on Raspberry Pi.

Desktop Sense HAT emulator

via Raspberry Pi

If this post gives you a sense of déjà-vu it’s because, last month, we announced a web-based Sense HAT emulator in partnership with US-based startup Trinket.

Today, we’re announcing another Sense HAT emulator designed to run natively on your Raspberry Pi desktop, instead of inside a browser. Developed by Dave Jones, it’s intended for people who own a Raspberry Pi but not a Sense HAT. In the picture below, the sliders are used to change the values reported by the sensors while your code is running.

sense-emu

So, why do we need two versions?

  • For offline use, possibly the most common way Raspberry Pis are used in the classroom.
  • To accommodate the oldest 256 MB models of Raspberry Pi which cannot run the web version.
  • To allow you to integrate your Sense HAT program with any available Python modules, or other Raspberry Pi features such as the Camera Module.

The emulator will come pre-installed in the next Raspbian release but, for now, you can just install it by typing the commands below into a terminal window:

sudo apt-get update
sudo apt-get install python-sense-emu python3-sense-emu python-sense-emu-doc sense-emu-tools -y

You can then access it from the Desktop menu, under Programming.

The emulator closely simulates the Sense HAT hardware being attached to your Pi. You can read from the sensors or write to the LED matrix using multiple Python processes, for example.

sense-idle

Write your code in IDLE as before; there are also a number of examples that can be opened from the emulator’s built-in menu. If you then want to port your code to a physical Sense HAT, you just need to change

sense_emu

to

sense_hat

at the top of your program. Reverse this if you’re porting a physical Sense HAT program to the emulator, perhaps from one of our educational resources; this step isn’t required in the web version of the emulator.

sense-emu-prefs

There are a number of preferences that you can adjust to change the behaviour of the emulator, most notably sensor simulation, otherwise known as jitter. This costs some CPU time, and is disabled by default on the low-end Raspberry Pis, but it provides a realistic experience of how the hardware sensors would behave. You’ll see that the values being returned in your code drift according to the known error tolerances of the physical sensors used on the Sense HAT.

This emulator will allow more Raspberry Pi users to participate in future Astro Pi competitions without having to buy a Sense HAT: ideal for the classroom where 15 Sense HATs may be beyond the budget.

So, where do you start? If you’re new to the Sense HAT, you can just copy and paste many of the code examples from our educational resources, like this one. You can also check out our e-book Sense HAT Essentials. For a complete list of all the functions you can use, have a look at the Sense HAT API reference here.

You can even install this emulator on other types of Linux desktop, such as Ubuntu! For more information on how to do this, please visit the emulator documentation pages here.

The post Desktop Sense HAT emulator appeared first on Raspberry Pi.