Arduino 101 | Episode 2: Read and Write Digital & Analog Signals

preview_player
Показать описание
In this second episode, we're diving deeper into the world of sensors by introducing a button and a potentiometer! We'll explore how to read and write both digital and analog signals, expanding on what we learned about controlling an LED in the first episode.

Digital signals are straightforward on/off switches, while analog signals offer a range of values that can be used to create more nuanced interactions. By reading input from the button and potentiometer, we'll control an LED in two exciting ways: toggling it on and off with digitalWrite and adjusting its brightness with analogWrite using PWM pins.

References:
-
LET'S CONNECT
-
Timestamps:
0:00 Intro
0:48 digitalRead() from a button
5:28 Explain serial communication
8:30 Fix switch bouncing issue #1 using delay()
11:35 Fix switch bouncing issue #2 using timing function
17:02 digitalWrite() to turn LED on & off
18:57 analogRead() from a potentiometer
22:27 analogWrite() to control LED's brightness
Рекомендации по теме
Комментарии
Автор

This genuinely looks so much fun to play with! Thanks Patt!

ParanoidMarvin
Автор

I have a question to you patt, how many videos have you planned before the final moving art thingy you showed in your presentation at bangkok. the reason why I am asking is because this arduino stuff is not really just syntax, circuits and logic, there's more to it. every project you make using the Arduino it's like learning a new language which is good in general but would you make any more physical computing projects?

sarthakmalhotra
Автор

Is it really a bouncing button that is the problem? Isn't it multiple registrations of one push. I think you should confirm that the button is "0" before you count a new push.

fredrik