Рет қаралды 2,847
In this video, we'll talk about working with an analog signal on the ATtiny10, i.e. about analogs of functions analogWrite () and analogRead ().
I will give an example of working with a 10kOhm potentiometer and receiving data from it, we will control the brightness of the LED. Those. Let's touch on how the Pulse Width Modulation (PWM) technology works on the ATtiny10.
First, we will analyze the reading of the analog signal and the operation of the analog-to-digital conversion (ADC) on the ATtiny10 microcontroller. And then, using the obtained value, we will set the brightness of the LED.
0:00 Working with analog signal on ATtiny10
1:11 Place the components on the breadboard
2:14 Sketch for reading an analog signal
4:28 Demonstration of ADC operation on ATtiny10
5:32 Sketch for working with PWM on ATtiny10
8:24 LED brightness control