Arduino Projects

 

Arduino projects I've used to teach my kids a practical approach to coding – a programming approach used by the most efficient developers in the real world.

 

Over the past few years I've had a lot of fun working on Arduino projects with my kids. The idea has been to teach them a practical approach to coding as I see it practiced by efficient developers in the real world.

That typically means starting by finding some kind of sample code that is already out there on the internet, code that already kinda/sorta does what we want it to.

Then it's about cleaning in up – good use of white space, useful comments, better structure (things like moving variables up to the top).

Next comes increasing the functionality – how do we make it do what we want?

It's been a lot of fun and very educational. This is the way I see coding done in the real world and believe it is a great programming foundation for them.

Arduino IDE "'lt' was not declared in this scope" Error

Be aware of a small encoding issue and the resulting "lt/gt was not declared in this scope" error when pasting into the excellent Arduino IDE for Mac.

Arduino Project – LED Skull Eyes 1

The first part of this project (adding LED "eyes" to a skull, driven by an Arduino UNO) was about teaching code optimization, abstraction and commenting.

Arduino Project – LED Skull Eyes 2: Wink Effect

More variables and the addition of a "wink" effect to make the LED skull eyes seem more animated.

Arduino Project – LED Skull Eyes 3: Adding a Second Eye

The next step involves adding a second "eye" (LED), independent of the first, to maintain the wink effect.

Arduino Project – LED Skull 4: Add HC-SR04 Ultrasonic Module

The next step in creating a spookier skull was to add an HC-SR04 ultrasonic module that would fire the LEDs based on proximity to a viewer.

Fire Breathing Arduino Pumpkin With IR Remote Control

A small change to another fire-breathing Arduino pumpkin replaces a proximity sensor with an small IR remote control.

Arduino Project – LED Skull 5: Adding Subroutines/Functions

This code was a great opportunity to introduce the idea of subroutines and returning values from subroutines (functions) with an Arduino Uno.