Tag Archives: astro 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.

Begin your journey with Raspberry Pi in The MagPi 49

via Raspberry Pi

We’ve all seen the numbers. The Raspberry Pi is selling faster and faster every year, which means there are new people getting Raspberry Pis every day. With this in mind, we decided to make a brand new beginner’s guide in issue 49 of The MagPi, out now.

Get started with Raspberry Pi with The MagPi 49!

Get started with Raspberry Pi with The MagPi 49!

The Raspberry Pi beginner’s guide takes you from selecting your Raspberry Pi all the way through setting it up and getting to know the Raspbian OS that powers it. We’re also using it to jump-start a beginner’s tutorial that will be a monthly feature in The MagPi from now on.

#49 Apollo Pi

Set your Pi up so it can take you to the moon! (Moon rocket not included)

As well as the cover feature, we also have a feature on the recently released Apollo 11 source code and how you can emulate a virtual Apollo computer on your Raspberry Pi, along with some historical factoids about making and programming a computer to take people to the moon. There’s also our usual range of amazing tutorials, projects, and product reviews for you to read about as well, including Mike Cook’s rhythmic gymnastics project in the Pi Bakery.

Rhythmic Gymnastics Ribbons

Inspired by the Rio Olympics Gymnastic display of ribbon twirling. In the MagPi 49 – September 2016, https://www.raspberrypi.org/magpi/ twirl your own virtual ribbons.

You can grab the latest issue of The MagPi in stores today from WH Smith, Tesco, Sainsbury’s, and Asda in the UK, and it will be in Micro Center and selected Barnes & Noble stores when it comes to America. It’s also available in print online from our store, and digitally on our Android and iOS app.

Get a free Pi Zero
Want to make sure you never miss an issue? Subscribe today and start with issue 47 to get not only the Astro Pi poster and mission patch, but also a Pi Zero bundle featuring the new, camera-enabled Pi Zero, and a cable bundle that includes the camera adapter.

Free Pi Zeros and posters: what’s not to love about a MagPi subscription?

Free Creative Commons download
As always, you can download your copy of The MagPi completely free. Grab it straight from the issue page for The MagPi 49.

Don’t forget, though, that like sales of the Raspberry Pi itself, all proceeds from the print and digital editions of the magazine go to help the Foundation achieve its charitable goals. Help us democratise computing!

I also want to remind you that we’re running a poll to find out what you, the community, think are the top 20 Raspberry Pi projects to be included in our 50th issue spectacular. Get voting!

No Title

No Description

The post Begin your journey with Raspberry Pi in The MagPi 49 appeared first on Raspberry Pi.

Blast off with The MagPi 47 Astro Pi special!

via Raspberry Pi

Get your free poster and mission patch exclusively in the print edition of The MagPi 47!

Get your free poster and mission patch exclusively in the print edition of The MagPi 47!

We’ve been avidly following Tim Peake’s adventures in space in The MagPi for the last six months, especially all the excellent work he’s been doing with the Astro Pis running code from school students across the UK. Tim returned to Earth a couple of weeks ago, so we thought we’d celebrate in The MagPi 47 with a massive feature about his time in space, along with the results of the Astro Pi experiments and the project’s future…

The space celebration doesn’t stop there: print copies of The MagPi 47 come with an exclusive Astro Pi mission patch and a Tim Peake Astro Pi poster!

The results of what Tim, Ed, and Izzy have been up to for the past six months

The results of what Tim, Ed, and Izzy have been up to for the past six months

The issue also has our usual range of excellent tutorials, from programming dinosaurs to creating motion sensor games and optical illusions. We also have the hottest news on high-altitude balloons and how you can get involved in sending a Pi to the edge of space, as well as the details on the next Pi Wars Pi-powered robot competition.

You can get your latest spaceworthy issue in-store from WH Smith, Tesco, Sainsburys, and Asda. Our American cousins will be able to buy issues from Barnes & Noble and Micro Center when the issue makes its way over there. It’s also available right now in print on our online store, which delivers internationally. If you prefer digital, it’s ready to download on the Android and iOS apps.

Get a free Pi Zero
Want to make sure you never miss an issue? Subscribe today and start with issue 47 to not only get the poster and mission patch, but also a Pi Zero bundle featuring the new, camera-enabled Pi Zero and a cable bundle that includes the camera adapter.

Free Pi Zeros and posters: what’s not to love about a MagPi subscription?

Free Creative Commons download
As always, you can download your copy of The MagPi completely free. Grab it straight from the issue page for The MagPi 47.

Don’t forget, though, that like sales of the Raspberry Pi itself, all proceeds from the print and digital editions of the magazine go to help the Foundation achieve its charitable goals. Help us democratise computing!

This is not the end of Astro Pi. It’s only the beginning.

The post Blast off with The MagPi 47 Astro Pi special! appeared first on Raspberry Pi.

Blast off with The MagPi 47 Astro Pi special!

via Raspberry Pi

Get your free poster and mission patch exclusively in the print edition of The MagPi 47!

Get your free poster and mission patch exclusively in the print edition of The MagPi 47!

We’ve been avidly following Tim Peake’s adventures in space in The MagPi for the last six months, especially all the excellent work he’s been doing with the Astro Pis running code from school students across the UK. Tim returned to Earth a couple of weeks ago, so we thought we’d celebrate in The MagPi 47 with a massive feature about his time in space, along with the results of the Astro Pi experiments and the project’s future…

The space celebration doesn’t stop there: print copies of The MagPi 47 come with an exclusive Astro Pi mission patch and a Tim Peake Astro Pi poster!

The results of what Tim, Ed, and Izzy have been up to for the past six months

The results of what Tim, Ed, and Izzy have been up to for the past six months

The issue also has our usual range of excellent tutorials, from programming dinosaurs to creating motion sensor games and optical illusions. We also have the hottest news on high-altitude balloons and how you can get involved in sending a Pi to the edge of space, as well as the details on the next Pi Wars Pi-powered robot competition.

You can get your latest spaceworthy issue in-store from WH Smith, Tesco, Sainsburys, and Asda. Our American cousins will be able to buy issues from Barnes & Noble and Micro Center when the issue makes its way over there. It’s also available right now in print on our online store, which delivers internationally. If you prefer digital, it’s ready to download on the Android and iOS apps.

Get a free Pi Zero
Want to make sure you never miss an issue? Subscribe today and start with issue 47 to not only get the poster and mission patch, but also a Pi Zero bundle featuring the new, camera-enabled Pi Zero and a cable bundle that includes the camera adapter.

Free Pi Zeros and posters: what’s not to love about a MagPi subscription?

Free Creative Commons download
As always, you can download your copy of The MagPi completely free. Grab it straight from the issue page for The MagPi 47.

Don’t forget, though, that like sales of the Raspberry Pi itself, all proceeds from the print and digital editions of the magazine go to help the Foundation achieve its charitable goals. Help us democratise computing!

This is not the end of Astro Pi. It’s only the beginning.

The post Blast off with The MagPi 47 Astro Pi special! appeared first on Raspberry Pi.

Astro Pi: Goodnight, Mr Tim

via Raspberry Pi

On Saturday, British ESA astronaut Tim Peake returned to Earth after six months on the International Space Station. During his time in orbit, he did a huge amount of work to share the excitement of his trip with young people and support education across the curriculum: as part of this, he used our two Astro Pi computers, Izzy and Ed, to run UK school students’ code and play their music in space. But what lies ahead for the pair now Tim’s mission, Principia, is complete?

Watch Part 4 of the Story of Astro Pi!

The Story of Astro Pi – Part 4: Goodnight, Mr Tim

As British ESA astronaut Tim Peake’s mission comes to an end, what will become of Ed and Izzy, our courageous Astro Pis? Find out more at astro-pi.org/about/mission/ Narration by Fran Scott: franscott.co.uk

Ed and Izzy will remain on the International Space Station until 2022, and they have exciting work ahead of them. Keep an eye on this blog and on our official magazine, The MagPi, for news!

The post Astro Pi: Goodnight, Mr Tim appeared first on Raspberry Pi.

Astro Pi: In Space, No One Can Hear You Code

via Raspberry Pi

British ESA astronaut Tim Peake has been on board the International Space Station with our Astro Pi units, Izzy and Ed, for exactly six months today. As Tim prepares to return to Earth this Saturday, we bring you the third part of their animated adventures: when our two spacefaring Raspberry Pi computers run into a problem even their hero Robonaut can’t fix, who can help them?

No Title

No Description

During his time in space, Tim has been using Ed and Izzy to run apps, carry out science experiments and play music designed and coded by UK school students, and he’s taken some great photos of them on the station:

Education

No Description

Both computers have also spent some weeks in a flight recorder mode, saving sensor readings to a database every ten seconds, and we’ve made these space data available to everyone to download and analyse. Take a look at our Flight Data Analysis resource to explore what they recorded as they orbited our planet.

Ed and Izzy will say goodbye to Tim when he returns from space this Saturday; you’ll be able to watch him land. Our Astro Pi units will stay on board the ISS until 2022, and we hope we’ll soon be able to share exciting news about what they’ll be doing next. Stay tuned!

The post Astro Pi: In Space, No One Can Hear You Code appeared first on Raspberry Pi.