Scott Hanselman

The Importance of the LED Moment - I DID THAT

March 2, '16 Comments [29] Posted in Hardware | Open Source
Sponsored By

Last March my friend Saron and I created and spent the whole month creating and learning with hardware.

It's March again! We're going to spend the whole month of March adding to

If you want to support our project, make sure you tell teachers, schools, family and friends about us, and tweet with the hashtag #marchisformakers.

Here's some of the highlights of this fantastic project from March of 2015. You can get ALL the content on our site, so bookmark and visit often.

Getting Started

You may have heard of Raspberry Pis and Arduinos, and perhaps considered doing a little tinkering, either with the children in your life or on your own? Where do you start?

What's "Hello World" in the world of hardware? It's making an LED light up!

I optimize my workflow for lots of tiny victories.

There's a moment when your tinkering. Getting that first program to compile or that first light to light up. Saron and I call it the LED Moment. When you are teaching a kid (a 100 year old kid or a little kid) how to successfully control an LED they'll light up..."I DID THAT." I pushed a button or ran a program or just plug it into a battery. There's a moment when a person see they can take control of the physical word, harness electricity, combine hardware and software and TURN A FREAKING LIGHT ON. That's the moment we are going for. Let's do it.

Arduino and an LED

Check out the article on CodeNewbies about Raspberry Pis and Arduinos by Julian. Arduinos are inexpensive and open source microcontrollers that are VERY affordable. I've got 4 or 5 around the house!


You'll want an Arduino UNO to start with. They are about $20 on Amazon but they don't include a USB cable (perhaps you have one) or an optional power supply. If you're planning on tinkering you might consider getting a "Super Starter Kit" or a Starter Kit WITH the Arduino that has all sorts of fun stuff like buttons and cables and fans and resistors.

For our little LED project you'll just want:

Ask around, you may have friends with these in their junk drawers so don't spend money unnecessarily.

Don't have an Arduino or can't get one? Fear not, you can simulate one in your browser for free! Check out

Ok, if you have a physical Arduino, go download the free Arduino Software for WIndows, Mac or Linux.

Different Boards

There are a number of different flavors of Arduino boards. Lots, in fact! Since it's an open source hardware spec anyone can make one and add their own special sauce. Here is just a few of the dozens of boards.

  • Arduino Uno - Arguably the most popular introductory model. It connects via USB and looks like a standard COM port to your computer. No wi-fi, no ethernet, although you can get an "Arduino Shield" add-on board that snaps on top to extend it to do most anything.
  • Arduino Yun - A fancy Arduino with a micro-SD slot, Wi-Fi, Ethernet, and more. It even supports an OpenWRT Linux called Linino.
  • Intel's Arduino 101 Kit - This board is an Arduino from Intel that adds Bluetooth Low Energy AND a 6 axis Accelerometer.

I have an Intel board with me today, so I need to tell the Arduino Software about it by downloading an "Arduino Core." You'll want to tell the software which board YOU are using.

I go Tools | Boards | Board Manager and search for "Intel" and install it. This tells the Arduino Software what it needs to know for my board to act right.


Plug the board in using a USB cable and make sure that you've selected the right board and the right port in your Arduino software.

I'm going to take my LED and put the short leg - that's the negative leg - into Arduino's GND, or Ground. Then I take the long or positive leg of the LED and connect it to the resistor,  then put the resistor into the Arduino's pin 13. We are going to control that pin with software we write!


We are going to pulse the LED by turning pin 13 HIGH, waiting a second, then going low. Like this, within the Arduino Software:

void setup() {
pinMode(13, OUTPUT);

void loop() {
digitalWrite(13, HIGH); // turn LED on (HIGH voltage)
delay(1000); // wait a second
digitalWrite(13, LOW); // turn LED off by making voltage LOW
delay(1000); // wait a second

Press Upload and my little Arduino Sketch is sent to my board and starts running! And here it is!

#MarchIsForMakers @intelIoT @arduinoorg #video

A video posted by Scott Hanselman (@shanselman) on

Again, every board is different. In my case, my Intel Arduino 101 board also has that gyroscope/accelerometer built in. I'll try playing with that soon!

What are you going to make this Month?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Wednesday, March 02, 2016 1:38:16 PM UTC
I'm making a temperature/humidity monitor for inside and outside our hoop house (kinda like a greenhouse). It will post temp/hum + battery level to a server in my house over wifi.

It's fun
Tom McKearney
Wednesday, March 02, 2016 2:22:15 PM UTC
Please note that there is and and only one of them is the true creator/developer of arduino (Seems to be Your article links to item on Amazon, which might be or might not be the right thing to do to support the right group of people. My personal uneducated opinion is that it isn't. It is just a thing of open-source conscience.

See this article on SE: or
Tomas Janovsky
Thursday, March 03, 2016 5:59:39 PM UTC
Here in Amsterdam we've got just that same first moment experience. The Red Light moment; the first moment you walk through the red light district for the first time.
Friday, March 04, 2016 7:19:24 AM UTC
"Arduinos are inexpensive and open source microcontrollers that are VERY affordable"

inexpensive? Thisis relative where do you live, work and how much do you get paid.

"open source microcontrollers" what means that? microcontroller is an piece of hardware, so what has it to do witjh Open source? Maybe open hardware was meant.

3rd: Arduino is a hype, a bunch of libraries top over a real C which produced a memory and space usage which is not good in real embedded programming.
Friday, March 04, 2016 8:31:29 AM UTC
It's surprising how many people don't know that you can buy Arduino Nano (with a USB serial) for under $2 on sites like aliexpress. This is inexpensive.

Also, just look at the price for STM32 Nucleo boards - very attractive for bigger projects.
Friday, March 04, 2016 1:13:19 PM UTC
Amazon won't ship to where I live (outside US). Pretty lame. I'll just flick the light switch on the wall instead - wopee!
El Dorko
Friday, March 04, 2016 1:40:17 PM UTC
Right after the LED Moment is the time that you see that everything is possible! Humidity sensor, no problem. Relays for controlling motors or AC power, no problem. Uploading data to a website for control and monitoring, no problem! Just takes some digging and playing.

It's a weird and powerful experience -- going from the software world to control and monitoring of the physical world.
Terry Lease
Saturday, March 05, 2016 12:57:24 PM UTC
Scott, for debugging this is your friend:

void setup() { Serial.begin(9600); }

void loop() { Serial.println(someSensorValue); };

Kristofer Krause
Sunday, March 06, 2016 2:01:28 AM UTC
of topic,
this is so cool, but where do you find time to embrace all of that?
Sunday, March 06, 2016 4:44:31 PM UTC
I hooked the rotary dial from an old telephone to my arduino, and can read the number of pulses and show it on a seven segment display. The idea is to build some kind of electronic door lock where you input a pin via the dial and it unlocks the door. These rotary dials are so neat, I wonder why we stopped using them in the first place!
Sunday, March 06, 2016 7:09:21 PM UTC
It is too good to read . . .
Monday, March 07, 2016 3:57:32 AM UTC
I was thinking about a pressure-sensitive trigger that tracks how many times my cat does his business, and some sort of remote service to push an alert to my phone/watch when it reaches a certain count.
Monday, March 07, 2016 11:19:40 PM UTC
Followed eventually by the "I did that 40 years ago" moment, when you realize that blinking an LED isn't all that much.

It IS still the Hello World of embedded development though! Sure is a lot easier to get started - and with vastly better tools - today than it was 40 years ago!
Carl D
Tuesday, March 08, 2016 2:33:15 AM UTC
Thanks Scott and Saron for putting this great content out!

I found getting an LED to turn on as exciting as the first time I drew lines on the screen in all 8 colours :)

My background is in programming business software and I always thought electronics would be tricky out of ignorance really. It turns out though that most things work together easily with common protocols and voltages and there are a lot of examples to get you started.

Once the LED glows you get hooked on it. Then start wiring up motors, sensors and other things. Its like programming a computer but interacting with the real world instead of just a screen.
Tuesday, March 08, 2016 5:13:42 PM UTC
(Back in the day, we had the Radio Shack 100 and 1 Electronic Project Kit. In high school shop or physics class you could actually build radios and such. What now days are called "Makers" we called tinkers, mechanics, hobbyists, home brewers, ham radio operators, nerds or amateur astronomers.)

This month so far I've finally finished an antenna ground system for the office/radio shack complete with lightning arrestor. (9 ground rods and 100' of #4 wire.) Also programming radios for local VHF/UHF repeaters, simplex and other services.

I'm planning an ADS-B data receiver using the Raspberry Pi and an RTL-SDR USB receiver. Means building another antenna, maybe a preamp and a little coding.

Plus building a go-kit for HF amateur radio operation. Maybe a remote dog shusher.

Chris Nelson
Wednesday, March 09, 2016 12:30:23 PM UTC
Im building my second fully electronic accordeon where the buttons of the arccordeon are the buttons to control the raspberrypi and play the music with an hifiberry amp

On the other hand im planning and partly already built a carrera-track control system (them little carerra cars^^) containing all parts like round-tracking, a big multi-7-segment-lcd display with housing for output and a controlbox with a small display and knobs to control max-speed of every track (to slow down the fullspeed looking away kinda guys) and turn on different play modes like 5-round-race or best-lap in 3 minutes.
Wednesday, March 09, 2016 6:43:47 PM UTC
After reading your previous articles about Raspberry Pi thought to try Raspberry Pi3 and ordered kit to explore. And now saw this awesome article about Ardunio. What are the main differences you felt while working between Ardunio vs Raspberry ?.
Which one is u r favorite and recommended?
Jo Paul
Friday, March 11, 2016 2:42:19 PM UTC
the lmportane of the led moment ldld that offer offer officer mr yasir ali
Thursday, March 17, 2016 8:50:13 PM UTC
Great Post Admin . . .
Monday, March 21, 2016 10:40:22 AM UTC
Arduinos are great but not always the right choice for a project at least after a test phase with one. For those with tighter budgets, lower power requirements such as coin cell powered, physical size constraints and probably other reasons there are sometimes better choices.

If you look at ATTiny85, ATTiny2313 or similar chip they can often be used as an alternative. These are largely compatible with Arduino code and can even be programmed from one. We are talking $1-2 price range for these chips and if you can achieve sleep mode in your loop you can power it for years on a coin cell.
Tuesday, March 22, 2016 1:29:17 PM UTC
good post
snapchat pc
Wednesday, March 23, 2016 8:56:37 PM UTC
very good read. thanks for sharing.
Friday, March 25, 2016 8:10:39 PM UTC
Thanks Scott. I have ordered ALL the things. Can't wait to get my hands on them to start tinkering.
Wednesday, March 30, 2016 5:59:55 AM UTC
Mobdro is very famous app to watch online tv shows and movies. You are interested to download then visit my official website.
Mobdro Download app
Mobdro for pc windows
Mobdro download for ipad
Tuesday, April 05, 2016 11:30:35 AM UTC
Awesome post!
Wednesday, April 27, 2016 7:20:49 PM UTC
Whatsapp has become a senstional messenger app for smartphones.Worldwide around 300 million people are using whatsapp messenger for sending free text messages, images and videos.The WhatsApp download for Samsung is completely free! You can directly start downloading without paying anything. download whatsapp check out
Saturday, May 14, 2016 7:57:27 AM UTC
thanks for information great thanks
Friday, May 27, 2016 7:37:21 PM UTC
Thanks for sharing! Free Android APK file download safe link apkdom best safe APK downloader free download mirror xapk obb server CoC private link. Love fun ideas lovematchfun join now. The Best Prank Apps, jokes and shocking Games for Android. prankyapps electric screen joke, Love Match test Prank, transparent screen android app, etc. Free Android app APK download softlot app games APK downloader. Gift Ideas giftspilot gifts for her and kids. Cheers!
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.