In the previous post I delved further into how Physical Computing works and what tools are available to use when merging code with the physical world. Two tools really emerge with this: the micro:bit and the Arduino. In my Smore newsletter, I also highlighted both of these tools. Both of these tools allow for incredible projects and programs with the physical environment. In fact, both of these tools can be used in similar ways to almost similar ends. The difference really is the programming tools to meet those ends though even the micro:bit can be programmed with almost any language by using the mbed compiler.

Power differences:

The Arduino will allow for more power (at 5 volts) to external sensors and devices (such as servos and motors) in comparison to the 3.3 volts of the micro:bit. The pin differences are negligible because the Arduino has 1 more digital pin than the micro:bit. Both have 6 analog pins.

Arduino, Micro:bit, Pi Comparison, Courtesy of Simon Monk @simonmonk2

The addition of sensors, motors, and servos can easily be added with the use of a breadboard to either device (such as the breadboard adapter for the micro:bit.) The Arduino can be wired directly to a breadboard as displayed here:

Programming the micro:bit

Programming the micro:bit is easy using block coding, Javascript, or MicroPython. Makecode.com from Microsoft is the initial site to visit to code the micro:bit and microbit.org to code in MicroPython. Personally I like using the Makecode environment only because I like the emulator that it provides to show how to connect devices – even motors and servos.

The MicroPython environment is amazing but takes a bit of understanding in order to program. I suggest Programming the BBC micro:bit from Simon Monk if you’re interested in diving into MicroPython programming.

What I enjoy about Makecode is that there are many other projects that you can import and then use in your own code. I did this recently with my own students as they programmed the Hyperduino Makerbit as they made a smart car. They imported the code for a Junk Bot and used a block they built for an ultrasonic sensor.

Programming the Arduino

Programming the Arduino can be a bit trickier. The Arduino IDE is the mainstay of programming the Arduino but if you are unfamiliar with text-based coding, it can seem a little daunting. Because of that, there are many different visual environments to code the Arduino:

However this is not even near complete so I suggest looking at other sites and blog posts that lend more insight.

My personal favorite is iForge:

In the above program, my 7-year old son programmed an Arduino for flashing LEDs in order to have a flashing light strand for a gingerbread house project he did for school. iForge works quite similarly to Makecode in that you simply (or rather in a super simplified manner) program the ‘pins’ for device to be on or off. The reality is that the programs can be very detailed and complicated but the heart of either the micro:bit or Arduino is controlling the pins.

It is one thing to write a program and watch it work on screen. It is a whole other thing to write a program and see it work in the real world. The micro:bit and Arduino are the bridges to physical computing. How we get them to work is the programming language. In the end, it depends upon what works best for you. I like working in iForge with Arduino. The recent updates have made it even easier to work with. For the micro:bit, I’m going to side with Makecode first and MicroPython second. Makecode can be as simple or as complicated as the programmer wants. Using other blocks and programs from others makes it even more robust (remember the ultrasonic block.)

What tool? That’s up to you. I like both. For entry level, I totally am for the micro:bit. There is so much to do with it using only the micro:bit and alligator clips. If you add a breadboard or a board such as the Hyperduino Makerbit, you have more opportunities to affect the physical environment. The Arduino by itself is bland. It does need additional boards (also known as shields) or a breadboard to get it to do much. Additions such as the Hyperduino-R makes connecting sensors and devices much easier.

In the previous post I brought up the concept Physical Computing and what it is and included ideas along with a post from a student project. Today, I want to go deeper and include specific technologies to use to get involved in the world of coding and physical devices.

Learning to work with the physical environment:

It is one thing to work with code and program a sprite to move on a screen or to program a ‘turtle’ to move to different coordinates. It is a whole other thing to work with a circuit board and have it interface with servos, sensors, and motors. The point is, the physical environment is tangible and we can see real, not virtual, affects the device we are programming, has upon it. So, when working with the physical environment we get to see real effects. I, being a visual learner, like to see how things work and how things are affected.
So if we are working with the physical environment, what should we work on? Well, that is up to you. You may find a need to program a servo because your Lego castle needs a working drawbridge, or maybe you are like Sam Patterson (@SamPatue) and take apart toys, see how they work, and reprogram them. Or maybe you just want to start a Christmas light show and want a system to do that. All these things are possible with devices like @arduino, @raspberrypi, and @microbit_edu.

Tasks:

Getting started need not be an overly complicated matter. Decide first what your project to is going to be. For me, I am going to take on doing a simple Christmas light show for one of our trees. The idea of setting up a program to run lights and hopefully sound is intriguing to me and I’m hoping for the best of success.
For me, Instructables tends to be one of the best sites for finding project ideas and Adafruit has a plethora of good resources and walkthroughs for Arduino, Raspberry Pi, Microbit, and other microprocessors and computers. If I don’t have an idea, I look for ideas so I can learn from other makers.

What tool do I use?

The Arduino is a microprocessor that allows for a variety of projects.

The setup is relatively basic. There are pins along the sides, a USB connector to interface with the computer and a battery port to connect a battery pack or 9V battery to run programs apart from the computer.
There are many interfaces to program the Arduino which includes the Arduino IDE, Scratch, Snap, iForge, and many other tools. The type of programming tool depends upon the level of programming ability the user has. Arduino IDE requires an understanding of programming, such as C. If you are not good with calling variables, writing loops, building and calling arrays, I suggest going with a block-style programming tool, such as iForge.
As much as the Arduino is an amazing tool, there is are external components you need to use it. By itself, it does nothing. You will need cables, sensors, a breadboard, resistors, and whatever you need to connect to it to turn on/off. The Arduino cannot do everything, but the amount of projects that can be made is astounding.
As much as I like the Arduino, there is a fairly high level of complexity with connecting components to it, whether that be sensors, motors, or servos. So, enter the HyperDuino-R:

This board is a shield that fits onto the Arduino and then allows the ability to connect to LEDs, touch sensors, servos, 3- and 4- sensors, motors, and more WITHOUT the use of a breadboard (and resistors) though if you really want to work with a breadboard you can.

Without the HyperDuino-R, connecting just ONE motor through a breadboard is an effort. The HyperDuino-R itself has a built in chip to allow for motor connection:

I think working with a breadboard is an important part of understanding circuit building. However, for getting people into physical computing, breadboards can be a pain to work with. The above image takes you to an instructable where someone used the HyperDuino-R to control temperature in a home brewery. With the introduction of the HyperDuino-R, maker projects, including robotics, is now much easier to do. Programming is still done with Arduino IDE or one of the block programming tools.
However, the level of understanding to program these devices is still rather high.

Introducing the micro:bit:

The micro:bit is a relative newcomer to microprocessor programming but it is making waves with adults and kids alike.

The micro:bit is small but built into in are sensors and bluetooth capability that allow students to do more with it out of the box than the Arduino. Students can immediately begin programming the built-in LED panel and work with the built-in A & B buttons, a compass, thermometer, and accelerometer to show data on the panel. The row of pins along the bottom allow connection with alligator clips to connect external speakers in order to play music, run a servo or small motor, or maybe a low powered (3V) sensor. If you want to work with Bluetooth controls, you can control the micro:bit to send signals to another micro:bit and control it. The ability to step into physical computing has gotten much easier!
Programming the micro:bit is easily done with Makecode from Microsoft or from a Python editor via micro:bit. Makecode allows users to code with blocks or with Javascript. The threshold to get into programming and working with the device is much lower and easier to enter into than the Arduino.
However, as much as the micro:bit allows you to get into physical computing, it is still limited in the types of maker projects that it can do.

Bring on the Makerbit:

Recently the HyperDuino-R has gone through an upgrade. There is still the HyperDuino that interfaces with the Arduino, but now there is the Makerbit:

Similar to the HyperDuino-R for Arduino, the Makerbit allows direct interface with the micro:bit and then allows for connection to LEDs, servos, 3- and 4- pin sensors and higher powered motors. The Makerbit can run the micro:bit with a 9V battery connection, bypassing the small 3.3V battery pack with the micro:bit. The motors allow for a connection with up to a 15V battery source (yes that’s high) and run various forms of motors, such as bi-directional motors. So, bring all the built-in sensors for the micro:bit, combine with the scalability of the Makerbit, and the programming ease of Makecode, and then the sky’s the limit for programming and projects.

In my next post on the micro:bit and HyperDuino, I will break down a smart car build along with a variety of other projects that can be done with these devices. Also, I will go through the coding tool to demonstrate the little to no level of programming knowledge necessary to get into programming and physical computing.

]]>146The need for physical computinghttp://organiteched.com/2017/10/24/the-need-for-physical-computing/
Tue, 24 Oct 2017 19:51:34 +0000http://organiteched.com/?p=124Read more The need for physical computing]]>Coding is one of the big buzzwords in the edusphere nowadays. Many campuses are involved in the Hour of Code, many more have moved beyond the Hour of Code and have established coding clubs. Some are using curriculum from code.org, others are going through Google’s cs-first curriculum, while others may use Tynker, Code Combat, or even go rogue and use their own home grown curriculum. Personally, I like the organic idea of building your own curriculum, though the resources from all the above listed sites are superb, and building from a foundation, especially a solid one is really a good idea.

So when people are doing all of this coding, what is it they are learning? At the foundation, people are learning logic, learning to create and solve algorithms (problems really), and going through the problem solving process to find a solution to the task at hand. Many of the tools, such as Tynker, Scratch, Snap, and Hopscotch have users manipulating sprites as a part of the program to give the programmer a more direct connection to what they are programming. I would argue that it is incredibly useful to build with blocks and then see how the sprite is affected. However programming at this level is only the beginning. The next step is physical computing.

So, physical computing. What is it and how do I get start doing it? Physical computing is basically merging hardware and software together in order perform physical functions that interact with the non-digital (aka analog) world. At the heart of physical computing are tools such as Spheros, Ozobots, Edison bots, the Lego WeDo, the EV3, Arduino, Raspberry Pi, and a new kid on the block, the Microbit. These are tools that are programmable through and interface but then sensors, motors, servos, and other electronics are added to help perform a variety of functions. What are some of the possibilities with physical computing:

Merging of the digital with the physical environment is a natural step in the programming process. When learning code, we deconstruct problems with the problem solving process for computer programming.

We construct the idea in Pseudocode, basically a stripped down form of the code that helps us to understand the logic and process of what is going on but without using the full code. After going through pseudo-coding, we begin the coding process and then the problem solving process begins. We naturally will have problems in the code and then it is up to us to debug and ‘make it work.’

The idea is the same with working with the physical environment. Let’s take a robot smart car:

This has motors, a microcontroller, and a sensor. The goal is to make an independent smart car that will move on the ground and when it confronts an obstacle, it will turn around. The microcontroller is programmed (using Makecode for Microbit, iForge for Arduino) to power up the motors. An Ultrasonic sensor is connected to the microcontroller and the pins on the microcontroller are set so the ultrasonic sensor is on and can ‘detect’ obstacles.

Naturally in this process a lot of ‘bugs’ happened in the code and I had to work out a lot of errors. I needed to get the motors to run independently, to turn correctly, to go the right speed. When I added the sensor, I had to control distance and then have the motors turn the proper length and time so that the car could move out of the way of the obstacle. This was definitely a process and took quite a bit of trial and error.

In a future blog post I hope to break down the Microbit or I may just have a student do a guest post and share their experiences with the Microbit and what it can do for learning.

Till next time. Keep the thinking organic!

]]>124Welcome to the future of EdTechhttp://organiteched.com/2017/09/26/welcome-to-the-future-of-edtech/
Tue, 26 Sep 2017 05:31:07 +0000http://organiteched.com/?p=77Read more Welcome to the future of EdTech]]>We need to get back to the grassroots of technology

Technology shouldn’t come in a box. It should spring forth from the mind, an innovative, organic idea that takes shape and is realized in the real world. Our mission is to get back to those basics in the classroom and equip teachers to educate our future generations to be innovators, inventors, creators, free thinkers. You won’t find that in a textbook, or a canned lesson plan. You have to dream it up. Join me in this journey of taking back EdTech to what it should be, organic technology: Welcome to OrganiTECH.