Author Archives: Matt Richardson

Processing: making art with code

via Raspberry Pi

This column is from The MagPi issue 56. You can download a PDF of the full issue for free, or subscribe to receive the print edition in your mailbox or the digital edition on your tablet. All proceeds from the print and digital editions help the Raspberry Pi Foundation achieve its charitable goals.

One way we achieve our mission at the Raspberry Pi Foundation is to find an intersection between someone’s passion and computing. For example, if you’re a young person interested in space, our Astro Pi programme is all about getting your code running on the International Space Station. If you like music, you can use Sonic Pi to compose songs with code. This month, I’d like to introduce you to some interesting work happening at the intersection between computing and the visual arts.

Image of Dead Presidents by Mike Brondbjerg art made with Processing

Mike Brondbjerg’s Dead Presidents uses Processing to generate portraits.

Processing is a programming language and development environment that sits perfectly at that intersection. It enables you to use code to generate still graphics, animations, or interactive applications such as games. It’s based on the Java programming language, and it runs on multiple platforms and operating systems. Thanks to the work of the Processing Foundation, and in particular the efforts of contributor Gottfried Haider, Processing runs like a champ on the Raspberry Pi.

Screenshot of Processing environment

When I want to communicate how cool Processing is while speaking to members of the Raspberry Pi community, I usually make this analogy: with Sonic Pi, you can use one line of code to make one note; with Processing, you can use one line of code to draw one stroke. Once you’ve figured that out, you can use computational tools such as loops, conditions, and variables to make some beautiful art.

And even though Processing is intended for use in the realm of visual arts, its capabilities can go beyond that. You can make applications that interact with the user through keyboard or mouse input. Processing also has libraries for working with network connections, files, and cameras. This means that you don’t just have to create artwork with Processing. You can also use it for almost anything you need to code.

Physical process

Processing is especially cool on the Raspberry Pi because there’s a library for working with the Pi’s GPIO pins. You can therefore have on-screen graphics interacting with buttons, switches, LEDs, relays, and sensors wired up to your Pi. With Processing, you could build a game that uses a custom controller that you’ve built yourself. Or you could create a piece of artwork that interacts with the user by sensing their proximity to it.

Processing screenshot

Best of all, Processing was created with learning to code in mind. It comes with lots of built-in examples, and you can use these to learn about many different programming and drawing concepts. The documentation on Processing’s website is very thorough and – as with Raspberry Pi – there’s a very supportive community around it if you run into any trouble. Additionally, the Processing development environment is powerful but also very simplified. For these reasons, it’s perfect for someone who is just getting started.

To get going with Processing on Raspberry Pi, there’s a one-line install command. You can also go to Processing.org and download pre-built Raspbian images with Processing already installed. To help you on your journey, there’s a resource for getting started with Processing. It includes a walkthrough on how to access the GPIO pins to combine physical computing and visual arts.

When you launch Processing, you will see a blank file where you can start keying in your code. Don’t let that intimidate you! All of the world’s greatest pieces of art started off as a raw slab of marble, a blob of clay, or a blank canvas. It just takes one line of code at a time to generate your own masterpiece.

Become a supporter

After this article appeared in The MagPi, the Processing Foundation put out a call for support:

We want you to be a part of this. Our work is almost entirely supported by individual one-time donations from the community. Right now we are outspending what we earn, and we have bigger plans! We want to continue all the work we’re doing and make it more accessible, more inclusive, and more responsive to the community needs.

To create lasting support for these new directions we’re starting a Membership Program. A membership is an annual donation that supports all this work and signifies your belief in it. You can do this as an individual, a studio, an educational institution, or a corporate partner. We will list your name on our members page along with all the others that help make this mission possible.

The post Processing: making art with code appeared first on Raspberry Pi.

Pi for the connected home

via Raspberry Pi

This column is from The MagPi issue 55. You can download a PDF of the full issue for free, or subscribe to receive the print edition in your mailbox or the digital edition on your tablet. All proceeds from the print and digital editions help the Raspberry Pi Foundation achieve its charitable goals.

Since the original Raspberry Pi Zero came out, I’ve seen many makers using it for connected home projects. Its size, low price, low power consumption, and software package have made it a great option, even if makers had to use a USB peripheral to add connectivity. Now that wireless LAN and Bluetooth connectivity are built into Raspberry Pi Zero W, it makes this mini computer platform even better suited for home Internet of Things projects.

Raspberry Pi Zero W

Let me get this out of the way first: ‘Internet of Things’, or ‘IoT’, has all the trappings of an overhyped buzzword. But even if the term Internet of Things doesn’t stick around very long, the concept of connected devices is here to stay for good. It’s a clear side effect of increasingly affordable wireless connectivity technology.

It’s not just development boards that are becoming more connected. The consumer electronics devices that we buy for our homes are more likely to have wireless capabilities. Even a product as simple as a light bulb can be equipped with connectivity, so that you can control its intensity and colour with a mobile app or home automation platform. I recently connected our Google Home to our WeMo Smart Plugs so that I can control the lights in our home using my voice. Last week I was carrying a load of laundry into a dark bedroom. Being able to say “OK Google, turn the bedroom lights on” and having it instantly do just that was a magical moment.

As makers and technology enthusiasts, we have even more power available to us. We benefit from affordable connectivity when it arrives on hardware platforms like Zero W, and can create the connected devices that we hope to see on store shelves one day. We also benefit from being able to interface with consumer-connected devices. For example, a simple hack with a Raspberry Pi lets you use Amazon Dash buttons to control almost anything you want. (Dash buttons are usually used to order a particular product, such as laundry detergent, from Amazon with just a single press.)

Advanced IoT

If you want to go beyond the basics, there are cloud-based platforms that let you manage many devices at once, and create intelligent alerts and actions. Many platforms are already Raspberry Pi-friendly, including the Particle Cloud, Initial State, Cayenne, and Resin.io. Each has its distinct advantages. For example, Initial State makes it really easy for you to create custom web-based dashboards to show you the state of your own sensors and internet-connected devices.

And if you’re a beginner, there are platforms that make it easy to get started with connected devices. One in particular is called IFTTT, which stands for ‘If This, Then That’. It’s an easy-to-use service that lets you connect consumer and maker platforms together without needing to write any code. IFTTT can also go beyond your devices: it can interact with the news, weather, or even local government. In the first partnership of its kind, the City of Louisville, Kentucky recently announced that it’s now on IFTTT and sending real-time air quality data, which you can log or use to trigger your own projects. I hope that it’s just the beginning for IoT partnerships like these.

With all the recent developments in the Internet of Things realm, Raspberry Pi Zero W comes at the perfect time to offer affordable, portable, and connected computing power. The best part is that exploring IoT doesn’t mean that you need to go too far into uncharted territory… it’s still the same Raspberry Pi that you already know and love.

The post Pi for the connected home appeared first on Raspberry Pi.

Lifelong Learning

via Raspberry Pi

This column is from The MagPi issue 54. You can download a PDF of the full issue for free, or subscribe to receive the print edition in your mailbox or the digital edition on your tablet. All proceeds from the print and digital editions help the Raspberry Pi Foundation achieve its charitable goals.

When you contemplate the Raspberry Pi Foundation’s educational mission, you might first think of young people learning how to code, how computers work, and how to make things with computers. You might also think of teachers leveraging our free resources and training in order to bring digital making to their students in the classroom. Getting young people excited about computing and digital making is an enormous part of what we’re all about.

Last year we trained over 540 Certified Educators in the UK and USA.

We all know that learning doesn’t only happen in the classroom – it also happens in the home, at libraries, code clubs, museums, Scout troop meetings, and after-school enrichment centres. At the Raspberry Pi Foundation, we acknowledge that and try hard to get young people learning about computer science and digital making in all of these contexts. It’s the reason why many of our Raspberry Pi Certified Educators aren’t necessarily classroom teachers, but also educate in other environments.

Raspberry Pis are used as teaching aids in libraries, after-school clubs, and makerspaces across the globe

Even though inspiring and educating young people in and out of the classroom is a huge part of what we set out to do, our mission doesn’t limit us to only the young. Learning can happen at any age and, of course, we love to see kids and adults using Raspberry Pi computers and our learning resources. Although our priority is educating young people, we know that we have a strong community of adults who make, learn, and experiment with Raspberry Pi.

I consider myself among this community of lifelong learners. Ever since I first tried Raspberry Pi in 2012, I’ve learned so much with this affordable computer by making things with it. I may not have set out to learn more about programming and algorithms, but I learned them as a by-product of trying to create an interesting project that required them. This goes beyond computing, too. For instance, I needed to give myself a quick maths refresher when working on my Dynamic Bike Headlight project. I had to get the speed of my bike in miles per hour, knowing the radius of the wheel and the revolutions per minute from a sensor. I suspect that – like me – a lot of adults out there using Raspberry Pi for their home and work projects are learning a lot along the way.

Internet of Tutorials

Even if you’re following a tutorial to build a retro arcade machine, set up a home server, or create a magic mirror, then you’re learning. There are tons of great tutorials out there that don’t just tell you what to type in, but also explain what you’re doing and why you’re doing it at each step along the way. Hopefully, it also leaves room for a maker to experiment and learn.

Many people also learn with Raspberry Pi when they use it as a platform for experimental computing. This experimentation can come from personal curiosity or from a professional need.

They may want to set up a sandbox to test out things such as networking, servers, cluster computing, or containers. Raspberry Pi makes a good platform for this because of its affordability and its universality. In other words, Raspberry Pis have become so common in the world that there’s usually someone out there who has at least attempted to figure out how to do what you want with it.

MAAS Theremin Raspberry Pi

A Raspberry Pi is used in an interactive museum exhibit, and kept on display for visitors to better understand the inner workings of what they’re seeing.

To take it back to the young people, it’s critical to show them that we, as adults, aren’t always teachers. Sometimes we’re learning right beside them. Sometimes we’re even learning from them. Show them that learning doesn’t stop after they graduate. We must show young people that none of us stops learning.

The post Lifelong Learning appeared first on Raspberry Pi.

Holidays with Pi

via Raspberry Pi

This column is from The MagPi issue 52. You can download a PDF of the full issue for free, or subscribe to receive the print edition in your mailbox or the digital edition on your tablet. All proceeds from the print and digital editions help the Raspberry Pi Foundation achieve its charitable goals.

When I was a kid, it felt like it took forever for the holidays to arrive. Now that I’m an adult, the opposite is true: it feels like the holidays come hurtling at us faster and faster every year. As a kid, I was most interested in opening presents and eating all of that amazing holiday food. As an adult, I mostly enjoy the opportunity to pause real life for a few days and spend time with my family – though I do still love eating all that amazing holiday food!

Invariably, the conversations with my extended family turn to Raspberry Pi at some point during the holidays. My relatives may have seen something in the news about it, or perhaps they have a friend who is creating their own retro gaming emulator with it, for example. I sometimes show off the Raspberry Pi projects that I’ve been working on and talk about what the Raspberry Pi Foundation is doing in order to put the power of digital making into the hands of people around the globe.

All over the world there will be a lot of folks, both young and old, who may be receiving Raspberry Pis as gifts during the holidays. For them, hopefully it’s the start of a very rewarding journey making awesome stuff and learning about the power of computers.

The side effect of so many people receiving Raspberry Pis as gifts is that around this time of year we get a lot of people asking, “So I have a Raspberry Pi… now what?” Of course, beyond using it as a typical computer, I encourage anyone with a Raspberry Pi to make something with it. There’s no better way to learn about computing than to create something.

There’s no shortage of project inspiration out there. You’ll find projects that you can make in the current edition of The MagPi, as well as all of the back issues online, which are all available as free PDF files. We share the best projects we’ve seen on our blog, and our Resources section contains fantastic how-to projects.

Be inspired

You can also explore sites such as Hackster.io, Instructables, Hackaday.io, and Makezine.com for tons of ideas for what you can make with your Raspberry Pi. Many projects include full step-by-step guides as well. Whatever you’re interested in, whether it’s music, gaming, electronics, natural sciences, or aviation, there’s sure to be something made with Raspberry Pi that’ll spark your interest.

If you’re looking for something to make to celebrate the holiday season, you’re definitely covered. We’ve seen so many great holiday-related Raspberry Pi projects over the years, such as digital advent calendars, Christmas light displays, tree ornaments, digital menorahs, and new year countdown clocks. And, of course, not only does the current issue of The MagPi contain a few holiday-themed Pi projects, you can even make something festive with the cover and a few LEDs.

There’s a lot of stuff out there to make and I encourage you to work together with your family members on a project, even if it doesn’t seem to be their kind of thing. I think people are often surprised at how easy and fun it can be. And if you do make something together, please share some photos with us!

Whatever you create and whatever holidays you celebrate, all of us at Raspberry Pi send you our very best wishes of the season and we look forward to another year ahead of learning, making, sharing, and having fun with computers.

The post Holidays with Pi appeared first on Raspberry Pi.

Making life changes

via Raspberry Pi

This column is from The MagPi issue 51. You can download a PDF of the full issue for free, or subscribe to receive the print edition in your mailbox or the digital edition on your tablet. All proceeds from the print and digital editions help the Raspberry Pi Foundation achieve its charitable goals.

Making things can change your life. It did for me, and I hear the same from others all the time.

After I graduated from university in 2003, I jumped immediately into the workforce. I landed in New York City’s entertainment industry, which is where I’d dreamed of working since I was young. I was excited to be a staffer on a major television show, where I learned what it takes to produce a weekly drama series. I slowly worked my way up the ladder in the industry over a few years.

There’s a lot to admire about how film and television content is produced. A crew of over one hundred people with creative and technical talents come together to create a piece of entertainment, under the watchful eye of the director. It’s an enormous piece of creative collaboration, but it’s also a business. Everyone does their part to make it happen. It’s incredible to see a show get made.

I had found a niche in the television industry that I did well in, but eventually I hit a rut. I had a small role in a big piece of work. I wanted to be more creative, and to have more autonomy and influence over what I was helping to create. It was at that time that I started closely following what makers were doing.

Feeling inspired by the work of others, I started to make things with microcontrollers and electronics. I’d then share information on how to recreate these projects online. Eventually, I was contributing projects to Make: magazine and I was soon able to make money from making things for companies, writing about how to make, and writing about what others were making. Soon enough, I was in a position to leave the television industry and work as a maker full-time.

That eventually led to my current job, doing outreach for Raspberry Pi in the United States. It’s incredibly gratifying work and despite the long road to get here, I couldn’t be happier with what I’m doing. The spare time I invested in making things as a hobby has paid off greatly in a new career that gives me creative freedom and a much more interesting work day.

Matt meets maker Gerald Burkett at World Maker Faire New York 2016.

Matt meets maker Gerald Burkett at World Maker Faire New York 2016.

Make it happen

I meet people all the time who have stories about how making has had an impact on their lives. At World Maker Faire New York recently, I met student Gerald Burkett, who told me his story of becoming a maker. He said, “I’m doing things I wouldn’t have ever dreamed of just four years ago, and it’s changed my life for the better.” And Gerald is having an impact on others as well. Even though he will be graduating soon, he’s encouraging the school’s administration to foster makers in the student body. He says that they “deserve an inviting environment where creativity is encouraged, and access to tools and supplies they couldn’t otherwise obtain in order to prototype and invent.”

Because of more accessible technology like the Raspberry Pi and freely available online resources, it’s easier than ever to make the things that you want to see in the world. Whether you are a student or you are far down a particular career path, it’s easier than ever to explore making as a passion and, potentially, also a livelihood.

If you’re reading this and you feel like you’re stuck in a rut with your job, I understand that feeling and encourage you to pursue making with vigour. There’s a good chance that what you make can change your life. It worked for me.

The post Making life changes appeared first on Raspberry Pi.

Meter Maid Monitor: parking protection with Pi

via Raspberry Pi

Parking can be a challenge in big cities like San Francisco. Spots are scarce, regulations are confusing, and the cost is often too darn high. At the TechCrunch Disrupt hackathon recently, John Naulty reached for a Raspberry Pi to help solve some of his parking problems.

The dreaded parking enforcement Interceptors! Source: Wikipedia

One of the dreaded parking enforcement Interceptors! Source: Wikipedia

John explained that the parking spots near his home only allow two hour parking. But he had figured out that you only get caught exceeding that if the parking enforcement officers see your car in the same spot for more than two hours. If he could somehow know when a meter maid’s Interceptor drives by, he would have a two hour heads-up before he had to move his vehicle.

Here’s how the Raspberry Pi comes into play:

“I used a Raspberry Pi with the Camera Module and OpenCV as a motion detector,” Naulty explains, rattling off the long list of tech that went into creating Meter Maid Monitor. “The camera monitors traffic and takes photos. The pictures are uploaded to AWS, where an EC2 instance running the TensorFlow supervised learning platform does the image recognition. I’ve trained it to recognise meter maid cars. Finally, if there’s more than a 75 percent chance of the car being a meter maid, it sends me a text message using Twilio, so I can move my car before I get a ticket”

If this all feels a bit nefarious and subversive to you, hopefully you can at the very least appreciate John’s clever use of technology. Either way, if you want to see his code for the Raspberry Pi and for the AWS instance, head on over to his GitHub repo for this project. If you have any other smart ideas for using Raspberry Pi to make city parking more bearable, let’s hear ’em!

The post Meter Maid Monitor: parking protection with Pi appeared first on Raspberry Pi.