Tag Archives: education

How to build databases using Python and text files | Hello World #9

Post Syndicated from Mac Bowley original https://www.raspberrypi.org/blog/how-to-build-databases-using-python-and-text-files-hello-world-9/

In Hello World issue 9, Raspberry Pi’s own Mac Bowley shares a lesson that introduces students to databases using Python and text files.

In this lesson, students create a library app for their books. This will store information about their book collection and allow them to display, manipulate, and search their collection. You will show students how to use text files in their programs that act as a database.

The project will give your students practical examples of database terminology and hands-on experience working with persistent data. It gives opportunities for students to define and gain concrete experience with key database concepts using a language they are familiar with. The script that accompanies this activity can be adapted to suit your students’ experience and competency.

This ready-to-go software project can be used alongside approaches such as PRIMM or pair programming, or as a worked example to engage your students in programming with persistent data.

What makes a database?

Start by asking the students why we need databases and what they are: do they ever feel unorganised? Life can get complicated, and there is so much to keep track of, the raw data required can be overwhelming. How can we use computing to solve this problem? If only there was a way of organising and accessing data that would let us get it out of our head. Databases are a way of organising the data we care about, so that we can easily access it and use it to make our lives easier.

Then explain that in this lesson the students will create a database, using Python and a text file. The example I show students is a personal library app that keeps track of which books I own and where I keep them. I have also run this lesson and allowed the students pick their own items to keep track of — it just involves a little more planning time at the end. Split the class up into pairs; have each of them discuss and select five pieces of data about a book (or their own item) they would like to track in a database. They should also consider which type of data each of them is. Give them five minutes to discuss and select some data to track.

Databases are organised collections of data, and this allows them to be displayed, maintained, and searched easily. Our database will have one table — effectively just like a spreadsheet table. The headings on each of the columns are the fields: the individual pieces of data we want to store about the books in our collection. The information about a single book are called its attributes and are stored together in one record, which would be a single row in our database table. To make it easier to search and sort our database, we should also select a primary key: one field that will be unique for each book. Sometimes one of the fields we are already storing works for this purpose; if not, then the database will create an ID number that it uses to uniquely identify each record.

Create a library application

Pull the class back together and ask a few groups about the data they selected to track. Make sure they have chosen appropriate data types. Ask some if they can find any of the fields that would be a primary key; the answer will most likely be no. The ISBN could work, but for our simple application, having to type in a 10- or 13-digit number just to use for an ID would be overkill. In our database, we are going to generate our own IDs.

The requirements for our database are that it can do the following things: save data to a file, read data from that file, create new books, display our full database, allow the user to enter a search term, and display a list of relevant results based on that term. We can decompose the problem into the following steps:

  • Set up our structures
  • Create a record
  • Save the data to the database file
  • Read from the database file
  • Display the database to the user
  • Allow the user to search the database
  • Display the results

Have the class log in and power up Python. If they are doing this locally, have them create a new folder to hold this project. We will be interacting with external files and so having them in the same folder avoids confusion with file locations and paths. They should then load up a new Python file. To start, download the starter file from the link provided. Each student should make a copy of this file. At first, I have them examine the code, and then get them to run it. Using concepts from PRIMM, I get them to print certain messages when a menu option is selected. This can be a great exemplar for making a menu in any application they are developing. This will be the skeleton of our database app: giving them a starter file can help ease some cognitive load from students.

Have them examine the variables and make guesses about what they are used for.

  • current_ID – a variable to count up as we create records, this will be our primary key
  • new_additions – a list to hold any new records we make while our code is running, before we save them to the file
  • filename – the name of the database file we will be using
  • fields – a list of our fields, so that our dictionaries can be aligned with our text file
  • data – a list that will hold all of the data from the database, so that we can search and display it without having to read the file every time

Create the first record

We are going to use dictionaries to store our records. They reference their elements using keys instead of indices, which fit our database fields nicely. We are going to generate our own IDs. Each of these must be unique, so a variable is needed that we can add to as we make our records. This is a user-focused application, so let’s make it so our user can input the data for the first book. The strings, in quotes, on the left of the colon, are the keys (the names of our fields) and the data on the right is the stored value, in our case whatever the user inputs in response to our appropriate prompts. We finish this part of by adding the record to the file, incrementing the current ID, and then displaying a useful feedback message to the user to say their record has been created successfully. Your students should now save their code and run it to make sure there aren’t any syntax errors.

You could make use of pair programming, with carefully selected pairs taking it in turns in the driver and navigator roles. You could also offer differing levels of scaffolding: providing some of the code and asking them to modify it based on given requirements.

How to use the code in your class

To complete the project, your students can add functionality to save their data to a CSV file, read from a database file, and allow users to search the database. The code for the whole project is available at helloworld.cc/database.

An example of the code

You may want to give your students the entire piece of code. They can investigate and modify it to their own purpose. You can also lead them through it, having them follow you as you demonstrate how an expert constructs a piece of software. I have done both to great effect. Let me know how your classes get on! Get in touch at [email protected]

Hello World issue 9

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



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

The post How to build databases using Python and text files | Hello World #9 appeared first on Raspberry Pi.

Your Back-to-School Bootcamp with our free online training

Post Syndicated from Dan Fisher original https://www.raspberrypi.org/blog/back-to-school-bootcamp-online-training/

Are you ready FEEL THE BURN…of your heating laptop? And MAX THOSE REPS…using forever loops? Then get your programming muscles into the best shape possible with our free online training courses.

Pump up your programming skills for free

Today we are excited to announce our new online training course Programming with GUIs — now open for sign-ups on FutureLearn. To celebrate, we’ve also curated a set of courses as your personal Back-to-school Bootcamp. Sign up now to start training from Monday 29 July and throughout August!

Scratch Cat and a Python supervising teachers at an outdoor bootcamp

Your Back-to-school Bootcamp has something for beginner, intermediate, and advanced learners, and all the courses are free, thanks to support from Google.

Also keep in mind that all the courses count towards becoming certified through the National Centre for Computing Education.

Couch to 5k…lines of code

If you’re just beginning to learn about coding, the perfect place to start is Programming 101: An Introduction to Python for Educators. You’ll first get to grips with basic programming concepts by learning about the basics of Python syntax and how to interpret error messages. Then you’ll use your new coding skills to create a chatbot that asks and answers questions!

Scratch Cat and a Python doing a relay race

For Primary teachers, our course Scratch to Python: Moving from Block- to Text-based Programming is ideal. Take this course if you’ve been using Scratch and are wondering how to introduce Python to your older students.

If you’ve been programming for a while, sign up for our brand-new course Programming with GUIs — an intermediate-level course that shows you how to build your own graphical user interface (GUI) in Python. You will learn how to incorporate interactivity in your programs, discover different types of GUI features, and build your confidence to design more complex GUI-based apps in the future.

Or maybe you’d like to try Programming 101’s follow-on course Programming 102: Think Like a Computer Scientist? Take your Python skills further by learning to break down problems into smaller tasks and designing algorithms you can apply to data.

Finally, if you’re an experienced computing educator, dig into Object-oriented Programming in Python, a really fun and challenging course that helps you get to grips with OOP principles by creating a text-based adventure game in Python.

Scratch Cat and a Python supervising an outdoors sports activity

Sign-ups are open until the end of August. Now go get those gains!

Tell us about your workout routine

What will your personal coding regime look like this summer? What online courses have you enjoyed taking this year? (They don’t have to be ours!) Tell us in the comments below.

No Title

No Description

The post Your Back-to-School Bootcamp with our free online training appeared first on Raspberry Pi.

The NEW Official Raspberry Pi Beginner’s Guide: updated for Raspberry Pi 4

Post Syndicated from Phil King original https://www.raspberrypi.org/blog/the-new-official-raspberry-pi-beginners-guide-updated-for-raspberry-pi-4/

To coincide with the launch of Raspberry Pi 4, Raspberry Pi Press has created a new edition of The Official Raspberry Pi Beginner’s Guide book — as if this week wasn’t exciting enough! Weighing in at 252 pages, the book is even bigger than before, and it’s fully updated for Raspberry Pi 4 and the latest version of the Raspbian operating system, Buster.A picture of the front cover of the Raspberry Pi Beginner's Guide version two

The Official Raspberry Pi Beginner’s Guide

We’ve roped in Gareth Halfacree, full-time technology journalist and technical author, and the wonderful Sam Alder, illustrator of our incredible cartoons and animations, to put together the only guide you’ll ever need to get started with Raspberry Pi.



From setting up your Raspberry Pi on day one to taking your first steps into writing coding, digital making, and computing, The Official Raspberry Beginner’s Guide – 2nd Edition is great for users from age 7 to 107! It’s available now online from the Raspberry Pi Press store, with free international delivery, or from the real-life Raspberry Pi Store in Cambridge, UK.

As always, we have also released the guide as a free PDF, and you’ll soon be seeing physical copies on the shelves of Waterstones, Foyles, and other good bookshops.

The post The NEW Official Raspberry Pi Beginner’s Guide: updated for Raspberry Pi 4 appeared first on Raspberry Pi.

European Astro Pi Challenge: Mission Space Lab winners 2018–2019!

Post Syndicated from Olympia Brown original https://www.raspberrypi.org/blog/european-astro-pi-challenge-mission-space-lab-winners-2018-2019/

This is your periodic reminder that there are two Raspberry Pi computers in space! That’s right — our Astro Pi units Ed and Izzy have called the International Space Station home since 2016, and we are proud to work with ESA Education to run the European Astro Pi Challenge, which allows students to conduct scientific investigations in space, by writing computer programs.

Astro PI IR on ISS

An Astro Pi takes photos of the earth from the window of the International Space Station

The Challenge has two missions: Mission Zero and Mission Space Lab. The more advanced one, Mission Space Lab, invites teams of students and young people under 19 years of age to enter by submitting an idea for a scientific experiment to be run on the Astro Pi units.

ESA and the Raspberry Pi Foundation would like to congratulate all the teams that participated in the European Astro Pi Challenge this year. A record-breaking number of more than 15000 people, from all 22 ESA Member States as well as Canada, Slovenia, and Malta, took part in this year’s challenge across both Mission Space Lab and Mission Zero!

Eleven teams have won Mission Space Lab 2018–2019

After designing their own scientific investigations and having their programs run aboard the International Space Station, the Mission Space Lab teams spent their time analysed the data they received back from the ISS. To complete the challenge, they had to submit a short scientific report discuss their results and highlight the conclusions of their experiments. We were very impressed by the quality of the reports, which showed a high level of scientific merit.

We are delighted to announce that, while it was a difficult task, the Astro Pi jury has now selected eleven winning teams, as well as highly commending four additional teams. The eleven winning teams won the chance to join an exclusive video call with ESA astronaut Frank De Winne. He is the head of the European Astronaut Centre in Germany, where astronauts train for their missions. Each team had the once-in-a-lifetime chance to ask Frank about his life as an astronaut.

And the winners are…

Firewatchers from Post CERN HSSIP Group, Portugal, used a machine learning method on their images to identify areas that had recently suffered from wildfires.

Go, 3.141592…, Go! from IES Tomás Navarro Tomás, Spain, took pictures of the Yosemite and Lost River forests and analysed them to study the effects of global drought stress. They did this by using indexes of vegetation and moisture to assess whether forests are healthy and well-preserved.

Les Robotiseurs from Ecole Primaire Publique de Saint-André d’Embrun, France, investigated variations in Earth’s magnetic field between the North and South hemispheres, and between day and night.

TheHappy.Pi from I Liceum Ogólnokształcące im. Bolesława Krzywoustego w Słupsku, Poland, successfully processed their images to measure the relative chlorophyll concentrations of vegetation on Earth.

AstroRussell from Liceo Bertrand Russell, Italy, developed a clever image processing algorithm to classify images into sea, cloud, ice, and land categories.

Les Puissants 2.0 from Lycee International de Londres Winston Churchill, United Kingdom, used the Astro Pi’s accelerometer to study the motion of the ISS itself under conditions of normal flight and course correction/reboost maneuvers.

Torricelli from ITIS “E.Torricelli”, Italy, recorded images and took sensor measurements to calculate the orbital period and flight speed of the ISS followed by the mass of the Earth using Newton’s universal law of gravitation.

ApplePi from I Liceum Ogólnokształcące im. Króla Stanisława Leszczyńskiego w Jaśle, Poland, compared their images from Astro Pi Izzy to historical images from 35 years ago and could show that coastlines have changed slightly due to erosion or human impact.

Spacethon from Saint Joseph La Salle Pruillé Le Chétif, France, tested their image-processing algorithm to identify solid, liquid, and gaseous features of exoplanets.

Stithians Rocket Code Club from Stithians CP School, United Kingdom, performed an experiment comparing the temperature aboard the ISS to the average temperature of the nearest country the space station was flying over.

Vytina Aerospace from Primary School of Vytina, Greece, recorded images of reservoirs and lakes on Earth to compare them with historical images from the last 30 years in order to investigate climate change.

Highly commended teams

We also selected four teams to be highly commended, and they will receive a selection of goodies from ESA Education and the Raspberry Pi Foundation:

Aguere Team from IES Marina Cebrián, Spain, investigated variations in the Earth’s magnetic field due to solar activity and a particular disturbance due to a solar coronal hole.

Astroraga from CoderDojo Trento, Italy, measured the magnetic field to investigate whether astronauts can still use a compass, just like on Earth, to orient themselves on the ISS.

Betlemites from Escoles Betlem, Spain, recorded the temperature on the ISS to find out if the pattern of a convection cell is different in microgravity.

Rovel In The Space from Scuola secondaria I grado A.Rosmini ROVELLO PORRO(Como), Italy, executed a program that monitored the pressure and would warn astronauts in case space debris or micrometeoroids collided with the ISS.

The next edition is not far off!

ESA and the Raspberry Pi Foundation would like to invite all school teachers, students, and young people to join the next edition of the challenge. Make sure to follow updates on the Astro Pi website and Astro Pi Twitter account to look out for the announcement of next year’s Astro Pi Challenge!

The post European Astro Pi Challenge: Mission Space Lab winners 2018–2019! appeared first on Raspberry Pi.

Ghost hunting in schools with Raspberry Pi | Hello World #9

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/digital-ghost-hunt-raspberry-pi-hello-world-9/

In Hello World issue 9, out today, Elliott Hall and Tom Bowtell discuss The Digital Ghost Hunt: an immersive theatre and augmented reality experience that takes a narrative-driven approach in order to make digital education accessible.The Digital Ghost Hunt - Raspberry Pi Hello World

The Digital Ghost Hunt combines coding education, augmented reality, and live performance to create an immersive storytelling experience. It begins when a normal school assembly is disrupted by the unscheduled arrival of Deputy Undersecretary Quill of the Ministry of Real Paranormal Hygiene, there to recruit students into the Department’s Ghost Removal Section. She explains that the Ministry needs the students’ help because children have the unique ability to see and interact with ghostly spirits.

The Digital Ghost Hunt - Raspberry Pi Hello World

Under the tutelage of Deputy Undersecretary Quill and Professor Bray (the Ministry’s chief scientist), the young ghost-hunters learn how to program and use their own paranormal detectors. These allow students to discover ghostly traces, translate Morse code using flickering lights, and find messages left in ultraviolet ectoplasm. Meanwhile, the ghost communicates through a mixture of traditional theatrical effects and the poltergeist potential of smart home technology. Together, students uncover the ghost’s identity, discover her reason for haunting the building, unmask a dastardly villain, find a stolen necklace, clear the ghost’s name, right an old wrong, and finally set the ghost free.

The Digital Ghost Hunt - Raspberry Pi Hello World

The project conducted two successful test performances at the Battersea Arts Centre in South London in November 2018, funded by a grant from AHRC’s New Immersive Experiences Programme, led by Mary Krell of Sussex University. Its next outing will be at York Theatre Royal in August.

Adventures in learning

The Digital Ghost Hunt arose out of a shared interest in putting experimentation and play at the centre for learners. We felt that the creative, tinkering spirit of earlier computing — learning how to program BASIC on an Atari 800XL to create a game, for example — was being supplanted by a didactic and prescriptive approach to digital learning. KIT Theatre’s practice — creating classroom adventures that cast pupils as heroes in missions — is also driven by a less trammelled, more experiment-led approach to learning.

We believe that the current Computer Science curriculum isn’t engaging enough for students. We wanted to shift the context of how computer science is perceived, from ‘something techy and boyish’ back to the tool of the imagination that it should be. We did this by de-emphasising the technology itself and, instead, placing it in the larger context of a ghost story. The technology becomes a tool to navigate the narrative world — a means to an end rather than an end in itself. This helps create a more welcoming space for students who are bored or intimidated by the computer lab: a space of performance, experiment, and play.

Ghosts and machines

The device we built for the students was the SEEK Ghost Detector, made from a Raspberry Pi and a micro:bit, which Elliot stapled together. The micro:bit was the device’s interface, which students programmed using the block-based language MakeCode. The Raspberry Pi handled the heavier technical requirements of the show, and communicated them to the micro:bit in a form students could use. The detector had no screen, only the micro:bit’s LEDs. This meant that students’ attention was focused on the environment and what the detector could tell them about it, rather than having their attention pulled to a screen to the exclusion of the ‘real’ world around them.

In addition to the detector, we used a Raspberry Pi to make ordinary smart home technology into our poltergeist. It communicated with the students using effects such as smart bulbs that flashed in Morse code, which the students could then decode on their devices.

To program their detectors, students took part in a series of four lessons at school, focused on thinking like a programmer and the logic of computing. Two of the lessons featured significant time spent programming the micro:bit. The first focused on reading code on paper, and students were asked to look out for any bugs. The second had students thinking about what the detector will do, and acting out the steps together, effectively ‘performing’ the algorithm.

We based the process on KIT Theatre’s Adventures in Learning model, and its Theory of Change:

  • Disruption: an unexpected event grabs attention, creating a new learning space
  • Mission: a character directly asks pupils for their help in completing a mission
  • Achievement: pupils receive training and are given agency to successfully complete the mission

The Ghost Hunt

During these lessons, Deputy Undersecretary Quill kept in touch with the students via email, and the chief scientist sent them instructional videos. Their work culminated in their first official assignment: a ghost haunting the Battersea Arts Centre — a 120-year-old former town hall. After arriving, students were split into four teams, working together. Two teams analysed evidence at headquarters, while the others went out into places in the building where we’d hidden ghostly traces that their detectors would discover. The students pooled their findings to learn the ghost’s story, and then the teams swapped roles. The detectors were therefore only one method of exploring the narrative world. But the fact that they’d learned some of the code gave students a confidence in using the detectors — a sense of ownership. During one performance, one of the students pointed to a detector and said: “I made that.”

Future of the project

The project is now adapting the experience into a family show, in partnership with Pilot Theatre, premiering in York in summer 2019. We aim for it to become the core of an ecosystem of lessons, ideas, and activities — to engage audiences in the imaginative possibilities of digital technology.

You can find out more about the Digital Ghost Hunt on their website, which also includes rather lovely videos that Vimeo won’t let me embed here.

Hello World issue 9

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

Hello World issu 9

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

The post Ghost hunting in schools with Raspberry Pi | Hello World #9 appeared first on Raspberry Pi.

An opportunity to reach thousands with the Raspberry Pi

Post Syndicated from Dana Augustin original https://www.raspberrypi.org/blog/an-opportunity-to-reach-thousands-with-the-raspberry-pi/

Dr Bob Brown is a former professor who taught at Kennesaw State University and Southern Polytechnic State University. He holds a doctorate in computer information systems. Bob is also a Raspberry Pi Certified Educator, and continues to provide exceptional classroom experiences for K-12 students. The moment his students have that “Aha!” feeling is something he truly values, and he continues to enjoy that experience in his K-12 classroom visits.

After retiring from teaching computing in 2017, Bob continued his school visits, first on an informal basis, and later as an official representative of KSU’s College of Computing and Software Engineering (CCSE). Keen to learn more about K-12 Computing, Bob applied to the Raspberry Pi Foundation’s Picademy program, and attended Picademy Atlanta in 2018. Here’s his story of how he has since gone on to lead several Raspberry Pi Teachers’ Workshops, inspiring educators and students alike.

“I couldn’t have done this if I had not attended Picademy” — Bob Brown

“I was amazed at the excitement and creativity that Picademy and the Raspberry Pi created among the teachers who attended,” Bob says. “After reading about the number of applicants for limited Picademy positions, I realized there was unmet demand. I began to wonder whether we could do something similar at the CCSE.”

Bob spent over a hundred hours developing instructional material, and raised over $2,000 from Southern Polytechnic alumni. With the money he raised, Bob conducted a pilot workshop for half a dozen teachers in the autumn of 2018. The workshop was free for participants, and covered material similar to Picademy, but in a one-day format. Participants were also given a Raspberry Pi 3B+ and a parts pack. Bob says, “I couldn’t have done this if I had not attended Picademy and been able to start with the Picademy material from the Raspberry Pi Foundation.”

“[The CCSE] helps improve access, awareness, and sustainability to middle and high school students and teachers.” — Jon Preston

The Dean of CCSE at KSU, Dr Jon Preston, was so impressed with the results of the pilot workshop that he authorised a formal fundraising program and two additional workshops in the spring of 2019. Four more workshops have also been scheduled for the summer.

“The College of Computing and Software Engineering at KSU STEM+Computing project helps improve access, awareness, and sustainability to middle and high school students and teachers. CCSE faculty and undergraduate students build learning materials and deliver these materials on-site to schools in an effort to increase the number of students who are energized by computing and want to study computing to help improve their careers and the world. Given the price and power of the Raspberry Pi computers, these devices are a perfect match for our project in the local schools,” says Preston.

The teachers really enjoyed the workshop, and left incredibly inspired.

Teachers came from all over Georgia and from as far away as Mississippi to attend the workshops. For some of the teachers, it was their first time exploring the concept of physical computing, and the hands-on approach to the workshop helped them set their own pace. The teachers really enjoyed the workshop, and left incredibly inspired. “Teacher workshops have a multiplier effect,” says Brown. “If I teach 30 students, I’ve reached 30 students; if I teach 30 teachers, I potentially reach thousands of students over a period of years.”

Another great contribution to the program was the addition of college student facilitators, who provided individual support to the teachers throughout the day, making it easier for everyone to have the assistance they needed.

By the end of the summer, more than 150 K-12 teachers will have participated in a CCSE Raspberry Pi Teachers’ Workshop.

The Raspberry Pi Teachers’ Workshops have become a regular part of the outreach efforts of the CCSE. Grants from State Farm Insurance, 3M Corporation, and a few very generous individual gifts keep the workshops free for K-12 teachers, who also take home a Raspberry Pi and extra components and parts. Participants are also invited to join an online forum where they can exchange ideas and support each other. By the end of the summer, more than 150 K-12 teachers will have participated in a CCSE Raspberry Pi Teachers’ Workshop. You can find more information about the workshops here.

The post An opportunity to reach thousands with the Raspberry Pi appeared first on Raspberry Pi.

The NSFW Roomba that screams when it bumps into stuff

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/the-nsfw-roomba-that-screams-when-it-bumps-into-stuff/

Hide yo’ kids, hide yo’ wife — today’s project is NSF(some)W, or for your kids. LOTS OF SWEARS. You have been warned. We’re not embedding the video here so you can decide for yourself whether or not to watch it — click on the image below to watch a sweary robot on YouTube.

Sweary Roomba

Michael Reeves is best known for such… educational Raspberry Pi projects as:

He’s back, this time with yet another NSFW (depending on your W) project that triggers the sensors in a Roomba smart vacuum to scream in pain whenever it bumps into an object.

Because why not?

How it’s made

We have no clue. So very done with fans asking for the project to be made — “I hate every single one of you!” — Michael refuses to say how he did it. But we know this much is true: the build uses optical sensors, relays, a radio receiver, and a Raspberry Pi. How do I know this? Because he showed us:

Roomba innards

But as for the rest? We leave it up to you, our plucky community of tinkerers, to figure it out. Share your guesses in the comments.

More Michael Reeves

Michael is one of our Pi Towers guilty pleasures and if, like us, you want to watch more of his antics, you should subscribe to him on YouTube.

The post The NSFW Roomba that screams when it bumps into stuff appeared first on Raspberry Pi.

Possibilities of the Raspberry Pi — from Code Club to Coolest Projects USA

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/possibilities-of-the-raspberry-pi-from-code-club-to-coolest-projects-usa/

Yolanda Payne is a veteran teacher and Raspberry Pi Certified Educator. After discovering a love for computers at an early age (through RadioShack Tandy), Yolanda pursued degrees in Instructional/Educational Technology at Mississippi State University, the University of Florida, and the University of Georgia. She has worked as an instructional designer, webmaster, and teacher, and she loves integrating technology into her lessons. Here’s Yolanda’s story:

My journey to becoming a Raspberry Pi Certified Educator started when an esteemed mentor, Juan Valentin, tweeted about the awesome experience he had while attending Picademy. Having never heard of Picademy or the Raspberry Pi, I decided to check out the website and instantly became intrigued. I applied for a Raspberry Pi STEM kit from the Civil Air Patrol and received a Raspberry Pi and a ton of accessories. My curiosity would not be satisfied until I learned just what I could do with the box of goodies. So I decided to apply to Picademy and was offered a spot after being waitlisted. Thus my obsession with the possibilities of the Raspberry Pi began.

Code Club allows me to provide a variety of lessons, tailored to my students’ interests and skill levels, without me having to be an expert

While at Picademy, I learned about Code Club. Code Club allows me to provide a variety of lessons tailored to my learners’ interests and skill levels, without me having to be an expert in all of the lessons. My students are 6th- to 8th-graders, and there are novice coders as well as intermediate and advanced coders in the group. We work through lessons together, and I get to be a student with them.

I have found a myriad of resources to support their dreams of making

Although I may not have all the answers to their questions, I’m willing to work to secure whatever supplies they need for their project making. Whether through DonorsChoose, grants, student fundraising, or my personal contributions, I have found a myriad of resources to support their dreams of making.

Raspberry Pi group photo!

My district has invested in a one-to-one computer initiative for students, and I am happy to help students become creators of technology and not just consumers. Having worked with Code Club through the Raspberry Pi Foundation, my students and I realize just how achievable this dream can be. I’m able to enhance my Pi skills by teaching a summer hacking camp at our local university, and next year, we have goals to host a Pi Jam! Thankfully, my principal is very supportive of our endeavours.

Students at Coolest Projects USA 2018

This year, a few of my students and my son were able to participate in Coolest Projects USA 2018 to show off their projects, including a home surveillance camera, a RetroPie arcade game, a Smart Mirror, and a photo booth and dash cam. They dedicated a lot of time and effort to bring these projects to life, often on their own and beyond the hours of our Code Club. This adventure has inspired them, and they are already recruiting other students to join them next year! The possibilities of the Raspberry Pi constantly rejuvenates my curiosity and enhances the creativity that I get to bring to my teaching — both inside and outside the classroom.

Learn more

Learn more about the free programmes and resources Yolanda has used on her computer science education journey, such as Picademy, Code Club, and Coolest Projects, by visiting the Education section of our website.

The post Possibilities of the Raspberry Pi — from Code Club to Coolest Projects USA appeared first on Raspberry Pi.

‘Gender Balance in Computing’ research project launch

Post Syndicated from Sue Sentance original https://www.raspberrypi.org/blog/gender-balance-in-computing-research-project-launch/

I am excited to reveal that a consortium of partners has been awarded £2.4 million for a new research project to investigate how to engage more girls in computing, as part of our work with the National Centre for Computing Education. The award comes at a crucial time in computing education, after research by the University of Roehampton and the Royal Society recently found that only 20% of computing candidates for GCSE and 10% for A level Computer Science were girls.

The project will investigate ways to make computing more inclusive.

The project

‘Gender Balance in Computing’ is a collaboration between the consortium of the Raspberry Pi Foundation, STEM Learning, BCS, The Chartered Institute for IT, and the Behavioural Insights Team. Our partners, Apps for Good and WISE, will also be working on the project. Trials will run from 2019–2022 in Key Stages 1–4, and more than 15,000 students and 550 schools will be involved. It will be the largest national research effort to tackle this issue to date!

Our research around gender balance has many synergies with the work of the wider National Centre for Computing Education (NCCE) programme, which also focuses on pedagogy and widening participation. We will also be working with NCCE Computing Hubs when planning and implementing the trials.

How it will work

‘Gender Balance in Computing’ will develop and roll out several projects that aim to increase the number of girls choosing to study a computing subject at GCSE and A level. The consortium has already identified some of the possible reasons why a large percentage of girls don’t consider computing as the right choice for further study and potential careers. These include: feeling that they don’t belong in the subject; not being sufficiently encouraged; and feeling that computing is not relevant to them. We will go on to research and pilot a series of new interventions, with each focusing on addressing a different barrier to girls’ participation.

We will also trial initiatives such as more inclusive pedagogical approaches to teaching computing to facilitate self-efficacy, and relating informal learning opportunities, which are often popular with girls, to computing as an academic subject or career choice.

Signposting the links between informal and formal learning is one of the interventions that will be trialled.

Introducing our partners

WISE works to increase the participation, contribution, and success of women in the UK’s scientific, technology, and engineering (STEM) workforce. Since 1984, they have supported young women into careers in STEM, and are committed to raising aspirations and awareness for girls in school to help them achieve their full potential. In the past three years, their programmes have inspired more than 13,500 girls.

The Behavioural Insights Team have worked with governments, local authorities, businesses and charities to tackle major policy problems. They generate and apply behavioural insights to inform policy and improve public services.

Apps for Good has impacted more than 130,000 young people in 1500 schools and colleges across the UK since their foundation in 2010. They are committed to improving diversity within the tech sector, engaging schools within deprived and challenging contexts, and enthusing girls to pursue a pathway in computing; in 2018, 56% of students participating in an Apps for Good programme were female.

“A young person’s location, background, or gender should never be a barrier to their future success. Apps for Good empowers young people to change their world through technology, and we have a strong track record of engaging girls in computing. We are excited to be a part of this important work to create, test, and scale solutions to inspire more girls to pursue technology in education. We look forward to helping to build a more diverse talent pool of future tech creators.” Sophie Ball & Natalie Moore, Co-Managing Directors, Apps for Good

The Raspberry Pi Foundation has a strong track record for inclusion through our informal learning programmes: out of the 375,000 children who attended a Code Club or a CoderDojo in 2018, 140,000 (37%) were girls. This disparity between the gender balance in informal learning and the imbalance in formal learning is one of the things our new research project will be investigating.

The challenge of encouraging more girls to take up computing has long been a concern, and overcoming it will be critical to ensuring that the nation’s workforce is suitably skilled to work in an increasingly digital world. I’m therefore very proud to be working with this group of excellent organisations on this important research project (and on such a scale!). Together, we have the opportunity to rigorously trial a range of evidence-informed initiatives to improve the gender balance in computing in primary and secondary schools.

The post ‘Gender Balance in Computing’ research project launch appeared first on Raspberry Pi.

Interactive fiction with Python | Hello World issue 8

Post Syndicated from Sian Williams Page original https://www.raspberrypi.org/blog/interactive-fiction-with-python-hello-world-issue-8/

Nicholas Provenzano explains how he introduced Python to students in his literature class, bridging computer science and literacy.

Literature classes seem like the last place you would find students coding, but interactive fiction has been around for decades. Students love to play computer games, and the very best games have amazing stories. This project will allow students to create their own piece of fiction and then use Python to turn it into a text-based computer game. Students will have a chance to create their own hero and monsters, treasures and traps and so much more while being introduced to Python. Students that love to write, and students that love to code, will love this lesson.

Hello World issue 8

I’ve been thinking a lot recently about to ways to bring computer science into the literature classroom. I set out exploring the Raspberry Pi projects page, where I saw a project that allowed the user to create their own text-based computer game using Python. I thought this would be a great way to engage students in reading, writing, and programming.

Students create their own piece of fiction and then use their stories to create an amazing text-based computer game based on the role-playing game (RPG) tutorial from Raspberry Pi: helloworld.cc/rpg. From the first day working on this project, my students fell in love with the writing and the coding. They couldn’t wait to create their game and share them with their friends.

The project is best introduced with a focus on creative writing, where students should create an outline for their own adventure story. With that in hand, introduce the students to the Raspberry Pi RPG tutorial. It is much easier for students to create their game if they draw out the rooms on paper to help them visualise the game they’re creating. The more time they are given to create their game, the more complex it can become. Students will be able to fully explore the code while creating a fun game they can share with others.

Hello World issue 8

This project is the perfect way to bring coding to a literature class. Students that love to write will be introduced to text-based programming, while students that love to code will have an opportunity to explore fiction through their own writing.

My students were excited to spend their time creating a complex story, and an even more complex game to challenge their friends and their teacher. Students who struggled with the code were helped by other students who’d already moved ahead. We spent a week on this project, but you could spend longer, depending on the breadth of the stories and games. Watching students use their critical thinking skills to plan out a maze for their players was great to see.

The best part was watching students who do not normally engage in reading and writing lessons become leaders as they embraced the coding and were excited to turn their story into a game and share it with everyone. This project will become a mainstay in my teaching for years to come.

Take this to your club or classroom

For the complete lesson plan of the above project, download Hello World issue 8 for free and turn to pages 80–81.

Hello World issue 8

Get Hello World issue 8 for free

Hello World is available to download for free in PDF format anywhere in the world. Subscribe to Hello World today to receive the latest issues into your inbox as soon as they’re released.

Hello World issue 8

If you are a UK-based educator, you can also subscribe for free print copies of Hello World, which will be delivered to your door at no extra cost.

And, lastly, if you’d like to purchase Hello World magazine, you can buy the latest issue via the Raspberry Pi Press website.

The post Interactive fiction with Python | Hello World issue 8 appeared first on Raspberry Pi.

New Wolfram Mathematica free resources for your Raspberry Pi

Post Syndicated from Philip Harney original https://www.raspberrypi.org/blog/new-wolfram-mathematica-resources-2019/

We’ve worked alongside the team at Wolfram Mathematica to create ten new free resources for our projects site, perfect to use at home, or in your classroom, Code Club, or CoderDojo.

Try out the Wolfram Language today, available as a free download for your Raspberry Pi (download details are below).

The Wolfram Language

The Wolfram language is particularly good at retrieving and working with data, like natural language and geographic information, and at producing visual representations with an impressively small amount of code. The language does a lot of the heavy lifting for you and is a great way to let young learners in particular work with data to quickly produce real results.

If you’d like to learn more about the Wolfram Language on the Raspberry Pi, check out this great blog post written by Lucy, Editor of The MagPi magazine!

Weather dashboard

Wolfram Mathematica Raspberry Pi Weather Dashboard

My favourite of the new projects is the weather dashboard which, in a few quick steps, teaches you to create this shiny-looking widget that takes the user’s location, finds their nearest major city, and gets current weather data for it. I tried this out with my own CoderDojo club and it got a very positive reception, even if Dublin weather usually does report rain!

Coin and dice

Wolfram Mathematica Raspberry Pi Coin and Dice

The coin and dice project shows you how to create a coin toss and dice roller that you can use to move your favourite board game into the digital age. It also introduces you to creating interfaces and controls for your projects, choosing random outcomes, and displaying images with the Wolfram Language.

Day and night

In the day and night tracker project, you create a program that gives you a real-time view of where the sun is up right now and lets you check whether it’s day or night time in a particular country. This is not only a pretty cool way to learn about things like time zones, but also shows you how to use geographic data and create an interactive experience in the Wolfram Language.

Sentimental 8-ball

Wolfram Mathematica Raspberry Pi 8-ball

In Sentimental 8-Ball, you create a Magic 8-Ball that picks its answers based on how positive or negative the mood of the user’s question seems. In doing so, you learn to work with lists and use the power of sentiment analysis in the Wolfram Language.

Face swap

Wolfram Mathematica Raspberry Pi face swap

This fun project lets you take a photo of you and your friend and have the Wolfram Language identify and swap your faces! Perfect for updating your profile photo, and also a great way to learn about functions and lists!

More Wolfram Mathematica projects

That’s only half of the selection of great new projects we’ve got for you! Go check them out, along with all the other Wolfram Language projects on our projects site.

Download the Wolfram Language and Mathematica to your Raspberry Pi

Mathematica and the Wolfram Language are included as part of NOOBS, or you can download them to Raspbian on your Raspberry Pi for free by entering the following commands into a terminal window and pressing Enter after each:

sudo apt-get update
sudo apt-get install wolfram-engine

The post New Wolfram Mathematica free resources for your Raspberry Pi appeared first on Raspberry Pi.

Real role models for International Women’s Day 2019

Post Syndicated from Maria Quevedo original https://www.raspberrypi.org/blog/real-role-models-international-womens-day-2019/

The Raspberry Pi Foundation’s mission is to bring computing and digital making to everyone. Tackling the persistent gender imbalance in technology is a crucial part of this undertaking. As part of our work to increase the number of girls choosing to learn how to create with technology, we are marking International Women’s Day with a celebration of real role models.

Real role models for International Women’s Day 2019

Maria Quevedo, Managing Director, Code Club & Raspberry Pi Foundation, talks about the importance of real role models who show girls and women that computing

Real role models are important

There is strong evidence to indicate that the presence of role models is a very effective way to inspire women and minorities to become interested in subjects and industries where they are underrepresented. Research suggests that the imbalance among the role models that girls and women are exposed to in their everyday lives contributes significantly to the persistently low number of girls pursuing science, technology, engineering and mathematics (STEM) subjects at school, and ultimately impacts their career choices.

A women and a young girl sit side by side. They are concentrating on a screen connected to a Raspberry Pi and smiling widely

Female role models in UK media

In order to understand the extent of this imbalance, we carried out an analysis to explore the visibility of female technology role models in the UK media.

One of our most striking findings was that in the twelve months since International Women’s Day 2018, each of the women competing in UK television’s Love Island 2018 was written about in the UK media on average seven times more often than 50 of the UK’s top female technology role models. And popular UK men’s lifestyle magazines were twice as likely to write about top female technology leaders than magazines aimed at women.

The cover of HackSpace magazine issue 11, with a "BEST MAKER HARDWARE" feature and photos of maker Alex Glow with her robot owl
A page from a magazine with the headline "Meet The Maker: Rachel 'Konichiwakitty' Wong" and a photograph of Rachel smiling and wearing LED kitty ears
Part of a magazine spread with the header "This Month in Raspberry Pi". There are lots of photos of makers, speakers and guests at World Maker Faire New York, most of them women, along with varied colourful projects
HackSpace magazine issue 5 cover, featuring Limor "Ladyada" Fried

We also looked at the subject matter covered by popular women’s and men’s magazines in the UK. We found that fashion (37% of all articles) and beauty (26%) were the most popular topics in women’s lifestyle media, while politics (5%) and careers (4%) were some of the least popular. The contrast with men’s lifestyle media was very pronounced. There, topic coverage was much more evenly distributed: fashion (21%) and politics (16%) came top, with grooming (12%) and careers (12%) close behind.

In other words, in the women’s lifestyle magazines, about 14 articles are written about fashion and beauty for every one about careers. Men’s lifestyle magazines, meanwhile, publish one careers piece for every three fashion and grooming articles.

Real role models in Code Club, CoderDojo, and beyond

It’s alarming to see such a dramatic imbalance in visibility for female technology leaders, and such stark differences between the focus of women’s and men’s media. We work hard to make sure our activities such as Code Club and CoderDojo are equally welcoming to girls and boys, and we’re proud that 45% of the volunteers and educators who run these clubs are women. However, role models in wider society are just as important in shaping the values, beliefs, and ambitions of girls and women.

We have a consistently high proportion of girls – around 40% – attending our Code Clubs and CoderDojos. But girls’ perceptions of computing, and their confidence, can be influenced hugely before they ever arrive at our clubs to give it a try – so much so that they may never arrive at all.

In this context, the differences we observed between the topics that women’s and men’s media cover are troubling. It really comes down to balance: there is absolutely nothing wrong with reading about fashion or beauty, but greater diversity in the women, interests, and careers that saturate our popular culture would undoubtedly impact the gender imbalance that persists in sectors such as technology and science.

We are for everyone

When it comes to encouraging girls to take part in our digital skills activities, our approach is highly adaptable, but ultimately we are for everyone. We believe this inclusive approach is the most effective way of reinforcing that all genders are equally capable of enjoying and excelling at computing. It would be invaluable to see this reflected in popular culture.

This International Women’s Day, we’re encouraging women to consider the ways in which we are real role models. Join us to celebrate the #RealRoleModels who inspire you, and share the fantastic contributions of girls and women in technology.

The post Real role models for International Women’s Day 2019 appeared first on Raspberry Pi.

What we are learning about learning

Post Syndicated from Oliver Quinlan original https://www.raspberrypi.org/blog/what-we-are-learning-about-learning/

Across Code Clubs, CoderDojos, Raspberry Jams, and all our other education programmes, we’re working with hundreds of thousands of young people. They are all making different projects and learning different things while they are making. The research team at the Raspberry Pi Foundation does lots of work to help us understand what exactly these young people learn, and how the adults and peers who mentor them share their skills with them.

Coolest Projects International 2018

Senior Research Manager Oliver Quinlan chats to participants at Coolest Projects 2018

We do our research work by:

  • Visiting clubs, Dojos, and events, seeing how they run, and talking to the adults and young people involved
  • Running surveys to get feedback on how people are helping young people learn
  • Testing new approaches and resources with groups of clubs and Dojos to try different ways which might help to engage more young people or help them learn more effectively

Over the last few months, we’ve been running lots of research projects and gained some fascinating insights into how young people are engaging with digital making. As well as using these findings to shape our education work, we also publish what we find, for free, over on our research page.

How do children tackle digital making projects?

We found that making ambitious digital projects is a careful balance between ideas, technology, and skills. Using this new understanding, we will help children and the adults that support them plan a process for exploring open-ended projects.

Coolest Projects USA 2018

Coolest Projects USA 2018

For this piece of research, we interviewed children and young people at last year’s Coolest Projects International and Coolest Projects UK , asking questions about the kinds of projects they made and how they created them. We found that the challenge they face is finding a balance between three things: the ideas and problems they want to address, the technologies they have access to, and their skills. Different children approached their projects in different ways, some starting with the technology they had access to, others starting with an idea or with a problem they wanted to solve.

Achieving big ambitions with the technology you have to hand while also learning the skills you need can be tricky. We’re planning to develop more resources to help young people with this.

Coolest Projects International 2018

Research Assistant Lucia Florianova learns about Rebel Girls at Coolest Projects International 2018

We also found out a lot about the power of seeing other children’s projects, what children learn, and the confidence they develop in presenting their projects at these events. Alongside our analysis, we’ve put together some case studies of the teams we interviewed, so people can read in-depth about their projects and the stories of how they created them.

Who comes to Code Club?

In another research project, we found that Code Clubs in schools are often diverse and cater well for the communities the schools serve; Code Club is not an exclusive club, but something for everyone.

Code Club Athens

Code Clubs are run by volunteers in all sorts of schools, libraries, and other venues across the world; we know a lot about the spaces the clubs take place in and the volunteers who run them, but less about the children who choose to take part. We’ve started to explore this through structured visits to clubs in a sample of schools across the West Midlands in England, interviewing teachers about the groups of children in their club. We knew Code Clubs were reaching schools that cater for a whole range of communities, and the evidence of this project suggests that the children who attend the Code Club in those schools come from a range of backgrounds themselves.

Scouts Raspberry Pi

Photo c/o Dave Bird — thanks, Dave!

We found that in these primary schools, children were motivated to join Code Club more because the club is fun rather than because the children see themselves as people who are programmers. This is partly because adults set up Code Clubs with an emphasis on fun: although children are learning, they are not perceiving Code Club as an academic activity linked with school work. Our project also showed us how Code Clubs fit in with the other after-school clubs in schools, and that children often choose Code Club as part of a menu of after-school clubs.

Raspberry Jam

Visitors to Pi Towers Raspberry Jam get hands-on with coding

In the last few months we’ve also published insights into how Raspberry Pi Certified Educators are using their training in schools, and into how schools are using Raspberry Pi computers. You can find our reports on all of these topics over at our research page.

Thanks to all the volunteers, educators, and young people who are finding time to help us with their research. If you’re involved in any of our education programmes and want to take part in a research project, or if you are doing your own research into computing education and want to start a conversation, then reach out to us via [email protected].

The post What we are learning about learning appeared first on Raspberry Pi.

GPIO Zero v1.5 is here!

Post Syndicated from Ben Nuttall original https://www.raspberrypi.org/blog/gpio-zero-v1-5/

GPIO Zero is a zero-boilerplate Python library that makes physical computing with Python more accessible and helps people progress from zero to hero.

Today, I’m pleased to announce the release of GPIO Zero v1.5.0. It’s packed full of updates, including new features, bug fixes, and lots of improvements to the documentation.

Guido, the creator of Python, happened across the library recently, and he seemed to like it:

Guido van Rossum on Twitter

GPIOzero I love you! https://t.co/w3CnUGx3yO

Pin factories – take your pick

GPIO Zero started out as a friendly API on top of the RPi.GPIO library, but later we extended it to allow other pin libraries to be used. The pigpio library is supported, and that includes the ability to remotely control GPIO pins over the network, or on a Pi Zero over USB.

This also gave us the opportunity to create a “mock” pin factory, so that we could emulate the effect of pin changes without using real Raspberry Pi hardware. This is useful for prototyping without hardware, and for testing. Try it yourself!

As well as the pin factories we provide with the library (RPi.GPIO, pigpio, RPIO, and native), it’s also possible to write your own. So far, I’m aware of only one custom pin factory, and that has been written by the AIY team at Google, who created their own pin factory for the pins on the AIY Vision Kit. This means that you can connect devices to these pins, and use GPIO Zero to program them, despite the fact they’re not connected to the Pi’s own pins.

If you have lots of experience with RPi.GPIO, you might find this guide on migrating from RPi.GPIO to GPIO Zero handy.

Ultrasonic distance sensor

We had identified some issues with the results from the DistanceSensor class, and we dealt with them in two ways. Firstly, GPIO Zero co-author Dave Jones did some work under the hood of the pins API to use timing information provided by underlying drivers, so that timing events from pins will be considerably more accurate (see #655). Secondly, Dave found that RPi.GPIO would often miss edges during callbacks, which threw off the timing, so we now drop missed edges and get better accuracy as a result (see #719).

The best DistanceSensor results come when using pigpio as your pin factory, so we recommend changing to this if you want more accuracy, especially if you’re using (or deploying to) a Pi 1 or Pi Zero.

Connecting devices

A really neat feature of GPIO Zero is the ability to connect devices together easily. One way to do this is to use callback functions:

button.when_pressed = led.on
button.when_released = led.off

Another way is to set the source of one device to the values of another device:

led.source = button.values

In GPIO Zero v1.5, we’ve made connecting devices even easier. You can now use the following method to pair devices together:

led.source = button

Read more about this declarative style of programming in the source/values page in the docs. There are plenty of great examples of how you can create projects with these simple connections:

Testing

An important part of software development is automated testing. You write tests to check your code does what you want it to do, especially checking the edge cases. Then you write the code to implement the features you’ve written tests for. Then after every change you make, you run your old tests to make sure nothing got broken. We have tools for automating this (thanks pytest, tox, coverage, and Travis CI).

But how do you test a GPIO library? Well, most of the GPIO parts of our test suite use the mock pins interface, so we can test our API works as intended, abstracted from how the pins behave. And while Travis CI only runs tests with mock pins, we also do real testing on Raspberry Pi: there are additional tests that ensure the pins do what they’re supposed to. See the docs chapter on development to learn more about this process, and try it for yourself.

pinout

You may remember that the last major GPIO Zero release introduced the pinout command line tool. We’ve added some new art for the Pi 3A+ and 3B+:

pinout also now supports the -x (or --xyz) option, which opens the website pinout.xyz in your web browser.

Zero boilerplate for hardware

The goal of all this is to remove obstacles to physical computing, and Rachel Rayns has designed a wonderful board that makes a great companion to GPIO Zero for people who are learning. Available from The Pi Hut, the PLAY board provides croc-clip connectors for four GPIO pins, GND, and 3V3, along with a set of compatible components:

Since the board simply breaks out GPIO pins, there’s no special software required. You can use Scratch or Python (or anything else).

New contributors

This release welcomed seven new contributors to the project, including Claire Pollard from PiBorg and ModMyPi, who provided implementations for TonalBuzzer, PumpkinPi, and the JamHat. We also passed 1000 commits!

Watch your tone

As part of the work Claire did to add support for the Jam HAT, she created a new class for working with its buzzer, which works by setting the PWM frequency to emit a particular tone. I took what Claire provided and added some maths to it, then Dave created a whole Tones module to provide a musical API. You can play buzzy jingles, or you can build a theremin:

GPIO Zero theremin

from gpiozero import TonalBuzzer, DistanceSensor buzzer = TonalBuzzer(20) ds = DistanceSensor(14, 26) buzzer.source = ds

…or you can make a siren:

GPIO Zero TonalBuzzer sine wave

from gpiozero import TonalBuzzer from gpiozero.tools import sin_values buzzer = TonalBuzzer(20) buzzer.source = sin_values()

The Tones API is a really neat way of creating particular buzzer sounds and chaining them together to make tunes, using a variety of musical notations:

>>> from gpiozero.tones import Tone
>>> Tone(440.0)
>>> Tone(69)
>>> Tone('A4')

We all make mistakes

One of the important things about writing a library to help beginners is knowing when to expect mistakes, and providing help when you can. For example, if a user mistypes an attribute or just gets it wrong – for example, if they type button.pressed = foo instead of button.when_pressed = foo – they wouldn’t usually get an error; it would just set a new attribute. In GPIO Zero, though, we prevent new attributes from being created, so you’d get an error if you tried doing this. We provide an FAQ about this, and explain how to get around it if you really need to.

Similarly, it’s common to see people type button.when_pressed = foo() and actually call the function, which isn’t correct, and will usually have the effect of unsetting the callback (as the function returns None). Because this is valid, the user won’t get an error to call their attention to the mistake.

In this release, we’ve added a warning that you’ll see if you set a callback to None when it was previously None. Hopefully that will be useful to people who make this mistake, helping them quickly notice and rectify it.

Update now

Update your Raspberry Pi now to get the latest and greatest GPIO Zero goodness in your (operating) system:

sudo apt update
sudo apt install python3-gpiozero python-gpiozero

Note: it’s currently syncing with the Raspbian repo, so if it’s not available for you yet, it will be soon.

What’s next?

We have plenty more suggestions to be working on. This year we’ll be working on SPI and I2C interfaces, including I2C expander chips. If you’d like to make more suggestions, or contribute yourself, find us over on GitHub.

The post GPIO Zero v1.5 is here! appeared first on Raspberry Pi.

Jenni Sidey inspires young women in science with Astro Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/jenni-sidey-inspires-young-women-science-astro-pi/

Today, ESA Education and the Raspberry Pi Foundation are proud to celebrate the International Day of Women and Girls in Science! In support of this occasion and to encourage young women to enter a career in STEM (science, technology, engineering, mathematics), CSA astronaut Jenni Sidey discusses why she believes computing and digital making skills are so important, and tells us about the role models that inspired her.

Jenni Sidey inspires young women in science with Astro Pi

Today, ESA Education and the Raspberry Pi Foundation are proud to celebrate the International Day of Women and Girls in Science! In support of this occasion and to encourage young women to enter a career in STEM (science, technology, engineering, mathematics), CSA astronaut Jenni Sidey discusses why she believes computing and digital making skills are so important, and tells us about the role models that inspired her.

Happy International Day of Women and Girls in Science!

The International Day of Women and Girls in Science is part of the United Nations’ plan to achieve their 2030 Agenda for Sustainable Development. According to current UNESCO data, less than 30% of researchers in STEM are female and only 30% of young women are selecting STEM-related subjects in higher education
Jenni Sidey

That’s why part of the UN’s 2030 Agenda is to promote full and equal access to and participation in science for women and girls. And to help young women and girls develop their computing and digital making skills, we want to encourage their participation in the European Astro Pi Challenge!

The European Astro Pi Challenge

The European Astro Pi Challenge is an ESA Education programme run in collaboration with the Raspberry Pi Foundation that offers students and young people the amazing opportunity to conduct scientific investigations in space! The challenge is to write computer programs for one of two Astro Pi units — Raspberry Pi computers on board the International Space Station.

Astro Pi Mission Zero logo

Astro Pi’s Mission Zero is open until 20 March 2019, and this mission gives young people up to 14 years of age the chance to write a simple program to display a message to the astronauts on the ISS. No special equipment or prior coding skills are needed, and all participants that follow the mission rules are guaranteed to have their program run in space!

Take part in Mission Zero — in your language!

To help many more people take part in their native language, we’ve translated the Mission Zero resource, guidelines, and web page into 19 different languages! Head to our languages section to find your version of Mission Zero and take part.

If you have any questions regarding the European Astro Pi Challenge, email us at [email protected].

The post Jenni Sidey inspires young women in science with Astro Pi appeared first on Raspberry Pi.

New Picademy North America dates for 2019

Post Syndicated from Andrew Collins original https://www.raspberrypi.org/blog/new-picademy-2019-dates/

Hooray, Picademy is back! We’re excited to bring our free computer science and digital making professional development program for educators to three new cities this summer:



Picademy 2019 dates

We’re thrilled to kick off our 2019 season, partnering with three new venues: we’ll be at Computer History Museum in the Bay Area the first week in June, at the University of California, Irvine in July, and at the Toronto Public Library in the second week in August. A big thank you to these venues for hosting us and supporting local educators to attend our free professional development program!



Picademy 2018 highlights

Last year, we partnered with four awesome venues to host eight Picademy events in the United States. Across the country at each Picademy, we met incredibly talented educators who are passionate about bringing digital making to their learners. Whether at the Liberty Science Center makerspace, on Georgia Tech University’s campus, or within the archives of the Living Computer Museum, we were truly inspired by all of our Picademy attendees, and thrilled to welcome them to the Raspberry Pi Certified Educator community.

Picademy at Liberty Science Center (June 18, 2018 – June 22, 2018)

A total of 80 educators from all over the globe visited Liberty Science Center the week of June 18 – 22 to learn coding and technology skills as part of the Raspberry Pi Foundation’s Picademy program. The week of learning culminated in a programming design challenge where the participants created projects using their new skills via the Raspberry Pi computer.

The 2018 Picademy cohorts were diverse and experienced in their field: more than 300 educators from 48 different U.S. states and 9 countries participated — a mix of high school, middle, and elementary classroom teachers, librarians, museum staff, university lecturers, and teacher trainers. We loved having the chance to welcome educators from such different backgrounds and help them learn, connect, collaborate, and create awesome projects together.

Picademy has a big impact on educators: last year, 78% of our graduates said they felt confident using Raspberry Pi after attending, and 70% said they were very likely to share their experience with their students and colleagues. And the majority of our Picademy attendees also developed an interest in starting a Code Club or a CoderDojo in their community!








Ready to join us for Picademy 2019? Learn more and apply now.

The post New Picademy North America dates for 2019 appeared first on Raspberry Pi.

Raspberry Pi-monitored chemical reactor 💥

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/raspberry-pi-monitored-chemical-reactor/

In Hello World issue 7, Steven Weir introduces a Raspberry Pi into the classroom to monitor a classic science experiment.

A Raspberry Pi can be used to monitor the reaction between hydrochloric acid and sodium thiosulphate to complement a popular GCSE Chemistry practical.

The rate of reaction between hydrochloric acid and sodium thiosulphate is typically studied as part of GCSE Chemistry. The experiment involves measuring the time required for the reaction mixture to turn cloudy, due to the formation of sulphur as a precipitate. Students can then change the temperature or concentration of the reactants to study their effect on the rate of reaction. The time for the reaction mixture to turn cloudy is normally facilitated by recording the time a hand-drawn cross takes to become obscured when placed underneath a glass vessel holding the reaction mixture. This timing is prone to variability due to operator judgement of when the cross first becomes obscured. This variability can legitimately be discussed as part of the lesson. However, the element of operator judgement can be avoided using a Raspberry Pi-monitored chemical reactor.

The chemical reactor

Attached to a glass jar of approximate 80ml volume (the size is not critical) are two drinking straws, of which one houses a white LED (light-emitting diode) and the other a LDR (light-dependent resistor). The jar is covered in black tape to minimise intrusion of ambient light. The reactor is shown in Figure 1, along with details of other electrical components and connection instructions to a Raspberry Pi.

Figure 1
A: Reactor covered in black tape
B: Drinking straw attached to the reactor, with a further straw inserted housing a white LED
C: Drinking straw attached to the reactor, with a further straw inserted housing a LDR
D: 220Ω resistor to connect to the LED and GPIO 23
E: Wire to connect to ground
F: Wire to connect to 3.3v supply
G: 1µF capacitor to connect to ground
H: Crocodile clip to connect to GPIO 27 (NB: the other end of the wire is situated in between the capacitor and the LDR)

Results

The Python code shown in Figure 2 should be run prior to addition of chemicals to the reactor. Instructions appear on the screen to prompt chemical additions and to start data collection.

Figure 2: Python code for the chemical reactor

Figure 3 shows the results from the experiment when 25ml 0.1M hydrochloric acid is reacted with 25ml 0.15M sodium thiosulphate at 20°C. The reaction is complete at the time the light transmission first reads 0, (i.e. complete obscuration of the light by the precipitate formation) — in this example, that time is 45.4s. For more advanced students, tangents can be drawn at various points on the curve, and gradients calculated to determine the maximum rate of reaction from various reaction conditions.

Figure 3: Graph showing the change in light transmission with time

Download Hello World for free

Download your free copy of Hello World issue 7 today from the Hello World website, where you’ll also find all previous issues. And if you’re an educator in the UK, you’ll have the chance sign up to receive free hard copies to your door!

The post Raspberry Pi-monitored chemical reactor 💥 appeared first on Raspberry Pi.

We’re hosting the UK’s first-ever Scratch Conference Europe

Post Syndicated from Helen Drury original https://www.raspberrypi.org/blog/announcing-scratch-conference-europe-2019/

We are excited to announce that we will host the first-ever Scratch Conference Europe in the UK this summer: from Friday 23 to Sunday 25 August at Churchill College, Cambridge!

A graphic highlighting the Scratch Conference Europe 2019 - taking place at Friday 23 to Sunday 25 August at Churchill College, Cambridge

Scratch Conference is a participatory event that gives hundreds of educators the chance to explore the creative ways in which people are programming and learning with Scratch. In even-numbered years, the conference is held at the MIT Media Lab, the birthplace of Scratch; in odd-numbered years, it takes place in other places around the globe.

Another graphic highlighting the Scratch Conference Europe 2019

Since 2019 is also the launch year of Scratch 3, we think it’s a fantastic opportunity for us to bring Scratch Conference Europe to the UK for the first time.

What you can look forward to

  • Hands-on, easy-to-follow workshops across a range of topics, including the new Scratch 3
  • Interactive projects to play with
  • Thought-provoking talks and keynotes
  • Plenty of informal chats, meetups, and opportunities for you to connect with other educators

Join us to become part of a growing community, discover how the Raspberry Pi Foundation can support you further, and develop your skills with Scratch as a creative tool for helping your students learn to code.

Contribute to Scratch Conference Europe

Would you like to contribute your own content at the event? We are looking for you in the community to share or host:

  • Project demos
  • Posters
  • Workshops
  • Discussion sessions
  • Presentations
  • Ignite talks

We warmly welcome young people under 18 as content contributors; they must be supported by an adult. All content contributors will be able to attend the whole event for free.

An over view of two people taking electronics pieces out of a box in order to try their hand at digital making using a Raspberry Pi and Scratch.

Find more details and apply to participate in this short online form.

Attend the conference

Tickets for Scratch Conference Europe will go on sale in April.

For updates, subscribe to Raspberry Pi LEARN, our monthly newsletter for educators, and keep an eye on @Raspberry_Pi on Twitter!

An update on Raspberry Fields

Since we’re hosting Scratch Conference Europe this year, our digital making festival Raspberry Fields will be back in 2020, even bigger and more packed with interactive family fun!

A young girl tries out a digital project at the Raspberry Pi event, Raspberry Fields 2018

Scratch is a project of the Lifelong Kindergarten group at the MIT Media Lab. It is available for free at scratch.mit.edu.

The post We’re hosting the UK’s first-ever Scratch Conference Europe appeared first on Raspberry Pi.

Scratch 3, and upgrading our free resources

Post Syndicated from Martin O'Hanlon original https://www.raspberrypi.org/blog/scratch-3-resource-upgrades/

On 2 January, MIT released the latest version of their incredible visual programming language: Scratch 3!

Screenshot of Scratch 3 interface

Scratch 3 is here

We love Scratch — it’s the perfect starting point for young people who want to try coding, and we’re offering a huge variety of free Scratch project guides for all interests and coding abilities.

Scratch 3 introduces a brand-new look and feel. The most obvious change is that the stage is now on the right-hand side; there are new paint and sound editing tools; new types of code blocks; and the blocks are now larger and easier to read.

To help you and your young learners navigate the new Scratch 3 interface, we’ve created a free, printable Scratch 3 poster:

Scratch 3 interface with annotations

Perhaps the biggest news is that Scratch 3 also works on tablets, opening up coding to many children who don’t have access to a computer.

We’ve upgraded!

We want to make this a smooth transition for all of you who rely on our free project resources, whether that be at a Code Club, CoderDojo, Raspberry Jam, or at home, so we’ve been busy upgrading our resources to work with Scratch 3.

Scratch 3 versions of all projects in the Code Club Scratch Modules 1–3 and the CoderDojo Scratch Sushi Cards are already live!

Screenshot of Scratch 3 project on Raspberry Pi projects site

The upgrading process also was a chance for us to review our resources to make sure they are the best they can be; as part of this, we’ve introduced a number of improvements, such as simplified layouts, better hints, and better print-outs.

And we know that for many people, starting to use Scratch 3 is not simple, or not even possible yet, so we are committed to providing support for both Scratch 2 and 3 for the next 12 months.

We are really pleased with how our newly polished Scratch projects turned out, and we hope you are too!

What’s to come

Over the coming months, we’ll update the rest of our Scratch projects. Meanwhile, our amazing volunteer translators will begin the process of translating the upgraded projects.

Raspberry Pi projects site

Brand-new projects that take advantage of some of Scratch 3’s new features are also in the pipeline!

Scratch 3 on Pi

Another reason for ensuring we support both Scratch 2 and 3 is that, at the moment, there is no offline, installable version of Scratch 3 for Raspberry Pi. Rest assured that this is something we are working on!

The creation of Scratch 3 for Raspberry Pi will be a two-step process: first we’ll support MIT with their optimisation of Scratch 3 to make sure it delivers the best performance possible on a range of devices; once that work is complete, we’ll create an offline build of Scratch 3 for Raspberry Pi, including new extensions for the GPIO pins and the Sense HAT.

Make sure you’re following us on Twitter and Facebook, as we’ll be announcing more information on this in the coming months!

The post Scratch 3, and upgrading our free resources appeared first on Raspberry Pi.

Staff Picademy and the sacrificial Babbage

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/staff-picademy-and-the-sacrificial-babbage/

Refill the coffee machine, unpack the sacrificial Babbages, and refresh the micro SD cards — it’s staff Picademy time!

Raspberry Pi Staff Picademy

Staff Picademy

Once a year, when one of our all-staff meeting brings together members of the Raspberry Pi team from across the globe, we host staff Picademy at our office. It’s two days of making and breaking where the coding-uninitiated — as well as the more experienced people! — are put through their paces and rewarded with Raspberry Pi Certified Educator status at the end.

Lest we forget the sacrificial Babbages and all they have done in the name of professional development

What is Picademy?

Picademy is our free two-day professional development programme where educators come together to gain knowledge and confidence in digital making and computing. On Day 1, you learn new skills; on Day 2, you put your learning to the test by finding some other participants and creating a project together, from scratch!

Our Picademy events in the United Kingdom and in North America have hosted more than 2000 Raspberry Pi Certified Educators, who have gone on to create after-school coding clubs, makerspaces, school computing labs, and other amazing things to increasethe accessibility of computing and digital making for tens of thousands of young people.

Why do we run staff Picademy?

Because we stand by what we preach: we believe in learning through making, and we want our staff to be able to attend events, volunteer at Picademy, Code Clubs, CoderDojos, and Raspberry Jams, and feel confident in what they say and do.

And also, because Picademy is really fun!

Stuff and things, bits and bobs: staples of any good Picademy

You don’t need to be techy to work at Raspberry Pi: we’re not all engineers. Our staff ranges from educators and web developers to researchers, programme managers, administrators, and accountants. And we think everyone should give coding a shot, so we love getting our staff together to allow them to explore a new skill — and have some fun in the process.

I *think* this has something to do with The MagPi and a Christmas tree?

At our staff Picademy events, we’ve made everything from automated rock bands out of tin foil to timelapse buggies, and it really is a wonderful experience to see people come together and, within two days, take a skillset that may be completely new to them and use it to create a fully working, imaginative project.

Timelapse buggy is a thing is beauty…as is Brian

Your turn

If you’re an educator looking to try something new in your classroom, keep an eye on our channels, because we’ll be announcing dates for Picademy 2019 soon. You will find them on the Picademy page and see them pop up if you follow the #Picademy tag on Twitter. We’ll also announce the dates and locations in our Raspberry Pi LEARN newsletter, so be sure to sign up.

And if you’d like to join the Raspberry Pi team and build something silly and/or amazing at next year’s staff Picademy, we have roles available in the UK, Ireland, and North America.

The post Staff Picademy and the sacrificial Babbage appeared first on Raspberry Pi.