The Maker Show: Episode 2 - Blinking LED...Now What?

Sign in to queue

Description

The "Hello World" of electronics is a blinking LED. But what do you do after that? In this episode of the Maker Show, we will use the Arduino to introduce a few new ways to work with your blinking LED from inputs with buttons and potentiometers to viewing input in the serial monitor.

[00:00] - Introduction
[00:26] - Hello World...or blinking LED
[03:15] - Dimming an LED with Analog
[07:01] - Digital Input with a Button
[09:51] - Analog Input with a Potentiometer
[15:23] - Conclusion

http://themakershow.io

Embed

Download

The Discussion

  • User profile image
    jota

    Another interesting video. I'd like to have known more about the potentiometer example, in what regards electricity. Why 50k, for example? or why is the value between 0-1024? Is this value arbitrary? And if the Led is analog, I assume 0-255 is a discretization of some voltage?

  • User profile image
    bsherwin

    Nothing special about the 50k resistor (except it was what I had on hand when shooting the video). The analogRead will give you a values between 0 and 1023. This represents the a value from 0 to 5v...so it's not entirely arbitrary. When the voltage is 0, the value is 0. When the voltage is 5v, you will have 1023. If you incorrectly connected this to a 3.3v pin, you would only get up to a value around 670 - 680.

    On the other hand, analogWrite only takes values between 0 and 255. 0 being always off and 255 being always on. Otherwise it is a pulse is at a regular frequency (depending on the speed of the pin). This is PWM. To be clear, the LED is digital. Connecting it to a PWM port allows you to blink it on and off in a frequency that is more off than on (less than 128) or more on than off (greater than 128) and allowing perception to take over on the "brightness" of the LED.

    A great place to read more about potentiometers and Arduino is here: https://www.arduino.cc/en/Tutorial/AnalogInput

     

Add Your 2 Cents