A bit of reflection on coding and making during the Hour of Code season and Computer Science Education Week. Why do I find it useful to learn to code and learn about ‘making’ stuff? For me, its liberating and satisfying to know how stuff works (what magic is in the box) and it’s satisfying to actually create things you have dreamed up. Here is an example :
My garage at home is like i’m sure many of your’s is, a space shared between the car/s and other items like tools, gardening equipment and things that you don’t want to store inside your home such as bicycles. Even with a double garage it is often a tight fit to park the car. Despite having parked in my garage hundreds of times I still always feel like I am about to driver either too far forward or not far enough to a) avoid hitting the shelves in front or b) not clearing the garage door. A few times I have thought, “I need a proximity sensor at the front to visually guide me know how close I am. Like reversing sensors but for driving forward.”
Ideas + knowledge of coding + electronics + tinkering = making!
So last night while waiting for my dinner to cook I knocked up an initial prototype / proof of concept using an Arduino (A Freetronics Eleven to be precise), an IR distance sensor (yeah I just happened to already have a few of those… yep… geek…), an RGB LED, a couple of resistors, header cables and a breadboard. The closer I get the colour changes and eventually flashes red. Here is the result: https://vine.co/v/i7gwdYlIiMz
This was about 30mins of tinkering before dinner! If I end up making one for the garage I might use RGB LED strip along the shelf, and would use a smaller Ardunio, put it all in box to keep it neat and maybe battery power it, and maybe even hook it up to the garage door so it turns on when the door opens and off when it closes.
The point is…with some knowledge of programming and basic electronics, not being afraid to give it a go, a bit of googling of reference materials, and an idea… you can make anything you can dream up.
If you are interested, this is the code in the middle of the Arduino sketch. I’m surethere is a more elegant way those more learned than me would solve this problem (basically if the sensor gives reading of between A and B change the colour to X, if its not change the light to green):
if (val >= 85 && val <= 200)
else if (val >= 201 && val <= 300)
else if (val >= 301)
Where to start? There are lots of options to choose from until you find one that suits your interests.
Try https://code.org/learn Lots of themed challenges there to give you a taste.
Even for adults I would recommend trying Scratch. Scratch is a programming language and online community where you can create your own interactive stories, games, and animations — and share your creations with others around the world. In the process of designing and programming Scratch projects, people learn to think creatively, reason systematically, and work collaboratively. Scratch is a project of the Lifelong Kindergarten group at the MIT Media Lab. It is available for free at http://scratch.mit.edu
Adding physical hardware to your knowledge of programming and being able to interactive and ‘see things happen’ is a great way to apply your programming knowledge. An Arduino kit is a great way to learn about electronics step by step and also transfer what you might have learned from using scratch over to the Arduino IDE (the more techy looking code like I used above… its not the complicated really!).
Two kits I recommend are:
The pcDuino scratch kit from http://www.linksprite.com.au/ or at Jaycar. This kit is amazing because you can use it to learn about the Internet of Thingstoo. Your creations could be hooked up to send emails or SMS to alert you of events. Eg the garage door is left open, SMS is sent to let me know.
The other one I like is from Freetronics and is also available from Jaycar. It has a great guide teaching you step by step from turning on an LED through to more complicated projects. The guide explains what is happening with the hardware and your programming. *I am not affiliated in any way with Jaycar… I just buy my Arduino parts from them. Your mileage may vary.
Be Inspired! Happy Making!