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 MarchIsForMakers.com 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 http://www.marchisformakers.com.

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!

91goKoGWHtL._SL1500_

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 http://123d.circuits.io/
image

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.

image

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!

BlinenLights

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, 02 March 2016 13:38:16 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, 02 March 2016 14:22:15 UTC
Please note that there is Arduino.cc and Arduino.org and only one of them is the true creator/developer of arduino (Seems to be arduino.cc). Your article links to Arduino.org 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: http://arduino.stackexchange.com/questions/11824/difference-between-arduino-cc-and-arduino-org or http://makezine.com/2015/03/19/massimo-banzi-fighting-for-arduino/
Tomas Janovsky
Thursday, 03 March 2016 17:59:39 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.
Bart
Friday, 04 March 2016 07:19:24 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.
Gregorius
Friday, 04 March 2016 08:31:29 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.
Andrew
Friday, 04 March 2016 13:13:19 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, 04 March 2016 13:40:17 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, 05 March 2016 12:57:24 UTC
Scott, for debugging this is your friend:

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

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

Kristofer Krause
Sunday, 06 March 2016 02:01:28 UTC
Scott,
of topic,
this is so cool, but where do you find time to embrace all of that?
Sunday, 06 March 2016 16:44:31 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, 06 March 2016 19:09:21 UTC
It is too good to read . . .
Monday, 07 March 2016 03:57:32 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, 07 March 2016 23:19:40 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, 08 March 2016 02:33:15 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, 08 March 2016 17:13:42 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. https://flightaware.com/adsb/piaware/build

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

Chris Nelson
Wednesday, 09 March 2016 12:30:23 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.
Mike
Wednesday, 09 March 2016 18:43:47 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, 11 March 2016 14:42:19 UTC
the lmportane of the led moment ldld that offer offer officer mr yasir ali
Thursday, 17 March 2016 20:50:13 UTC
Great Post Admin . . .
Monday, 21 March 2016 10:40:22 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.
pete
Tuesday, 22 March 2016 13:29:17 UTC
good post
snapchat pc
Wednesday, 23 March 2016 20:56:37 UTC
very good read. thanks for sharing.
Friday, 25 March 2016 20:10:39 UTC
Thanks Scott. I have ordered ALL the things. Can't wait to get my hands on them to start tinkering.
markokstate
Wednesday, 30 March 2016 05:59:55 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
steven
Tuesday, 05 April 2016 11:30:35 UTC
Awesome post!
http://raeeswatchonline.blogspot.com/
http://raessfullmovie.blogspot.com/
http://raeeshindifilm.blogspot.com/
http://raeeshindimovie.blogspot.com/
http://raeesfullmovieonlineinhd.blogspot.com/
http://raeesfullmovieonline.blogspot.com/
http://raeesmovietrailer.blogspot.com/
http://raessfullmoviewatchonline.blogspot.com/
http://watchonlinebollywoodmoviesinyoutube.blogspot.com/
http://raeeswatchhindimoviesonline.blogspot.com/




https://www.pinterest.com/salmanalam443/
http://www.scoop.it/u/faizan-alam
http://letsfaizanalam990.tumblr.com/
http://www.scoop.it/u/kiran-khan-4



http://videoinhd.ucoz.com/index/watch_online_bollywood_hollywood_and_tamil_dubbed_hindi_movies/0-4
http://watconlinetamildubbeanhindimovies.weebly.com/
http://salmanalam.doodlekit.com/home/watch-online-bollywood-hollywood-and-tamil-dubbed-hindi-movies
Wednesday, 27 April 2016 19:20:49 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
johnwoods
Saturday, 14 May 2016 07:57:27 UTC
thanks for information great thanks
cahayachafi
senangista
umamgreat
kim89
Friday, 27 May 2016 19:37:21 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!
fwergbv
Comments are closed.

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