How to build and code real things

Traditionally, you learn computer science and coding through building a website or an app. Today, there's a new way to get really hands-on with computer science: physical computing. 

But what is physical computing?

Physical computing, broadly, means building interactive systems that combine software and hardware to sense and respond to our physical world.

Physical computing projects can greatly vary in complexity, but they all share the common theme of taking inputs from the real world, processing that information, and then performing some action.

So now let’s go back in time a bit and learn a bit about how physical computing, as we know it today, came to be.

 

 

In the 1940s, WWII accelerated the advancements of computers because the military had needs for more accurate calculations for ammunition and vehicles.

Then, in the 1970s, the first microprocessor was introduced. It basically miniaturized the core components of a computer into a circuit board, making it more portable.

In the 1980s came the advancement of more powerful coding languages such as C, C++, and later Python.

Later in 2005, Arduino makes microprocessors accessible to the non-technical audience, meaning anyone without a computing background can use it in various applications.

In 2012, Raspberry Pi makes computing in general accessible to all, packing all the complexities of a general purpose computer into a small credit-card sized board. The rise of accessible and programmable circuit boards have attracted a following of many adult hobbyists around the world.

And in 2017, Forbes Magazine reports that physical computing is starting to make its way into academic institutions, from universities to K-12 schools as a new teaching strategy on the cutting-edge of STEM education!

Benefits of physical computing in education

It is a holistic approach to computer science education: you not only learn about syntax and software but also how it connects to hardware and the physical world.

You develop both technical and soft skills due to the interactive nature of physical computing projects.

It allows the blending of computer science principles and computational thinking skills with many other subjects such as art, physics, chemistry, and biology.

And of course, these are all important because the future of work is tech! Over 25 millions jobs are going to be automated by year 2030 and most industries are looking for candidates with baseline computing skills.

Tools for physical computing

There are many awesome tools for physical computing being developed today. In this article we're going to focus on the two most popular boards in the world, the Arduino and the Raspberry Pi.

Below is a summary of the general similarities and differences between these two boards:

They are both low-cost, and they can be integrated with other open source hardware like sensors and motors that are available off-the-shelf.

They may look really similar, but Arduino and Raspberry Pi are quite different. For starters, the Raspberry Pi is a fully functional computer, while the Arduino is a microcontroller, which is just a single component of a computer.

Microcontrollers like Arduino can only run one program at a time, repeatedly. In addition, you code the Arduino in C or C++ out of the box.

Computers like Raspberry Pi can run multiple programs, and Raspberry Pi runs on a LINUX operating system. You code the Raspberry Pi in Python or Scratch out of the box.

Using the Arduino

A benefit of the Arduino is its simple setup. All you need to get started is to download the Arduino software and connect the hardware to your laptop via USB.

It has built-in analog-to-digital inputs so it can read external environments and display the data in the software easily.

The cons of using an Arduino are that you must first script the code and then upload it into the Arduino hardware, which is not as intuitive for learning coding. In addition, there is a high learning curve for C/C++ because of its complex syntax.

Here is the Arduino’s software, with a very simple coding environment with some scaffolding code to get you started:

You can plug in LED lights directly to the hardware, and integrate sensors that can read data from your environment.

Using the Raspberry Pi

You can code it in real-time! That means after you write and run a line of code it will affect your hardware instantaneously.

It is great for introducing coding concepts because of its use of introductory programming languages like Python and Scratch.

The major con is that it is complex to set up: usually you need to plug in a monitor, keyboard, or mouse or connect it to the internet to even access it, and there is no built-in analog-to-digital inputs in the software which means you’ll have to program it yourself.

(At QPi Kits, we actually streamline this entire setup for you: all you need is a laptop to connect to your Raspberry Pi wirelessly; no need for a monitor, keyboard, or mouse!)

Below is the interface of the Raspberry Pi’s software. It looks like a regular desktop because it is just a regular computer. It even has a web browser, terminal, and other cool tools. One of the tools is Thonny IDE, which similarly to the Arduino’s, it allows you to program the Raspberry Pi in Python.

Because the Raspberry Pi is a fully functioning computer, you can use it to build complex projects like an automatic plant watering machine.

Introducing the Micro:Bit

I also wanted to mention the Micro:Bit, which was introduced in 2015 by BBC.

It is a microcontroller, so it is more similar to Arduino than the Raspberry Pi, but what makes it unique is that it has built-in sensors and input output connectors. It only costs $25, and it has 25 LED lights on it, an accelerometer, and buttons.

It is also programmable in Scratch/Python or any language you download into it. This makes this product a very interesting contender to Arduino.

Which physical computing device is best for you?

The answer is “it depends”.

In summary, we’ve seen that the Arduino is simple but has limited applications, and is best suited for purely hardware projects.

Meanwhile, the Raspberry Pi is more complex but has more applications on a wider spectrum of complexity, and is better suited for learning coding. That is why at QPi, we've chosen the Raspberry Pi as the physical computing device to teach Python in our beginner course, How to Make a Robot.

In the end, it depends on what you want to focus on in your learning and what kind of projects you intend to implement.

But no matter what you choose, you're going to have a lot of fun with physical computing and learn valuable skills in computer science!

Leave a comment

Please note, comments must be approved before they are published