In a previous lab we covered how to use an Analog Input
to control the brightness of a PWM Output
, where a higher number from the Analog Input
results in higher duty cycle
/ a brighter LED
. What if we want the opposite effect: a higher number from the Analog Input
results in a dimmer...
Note: props to this fantastic article
Transistors are three pin components capable of amplifying or switching signals. In Physical Computing we typically use them to control high voltage devices (like motors, lights, or solenoids) by quickly toggling a pin between HIGH
and LOW
...
ESP32
3V
ESP32
34
ESP32
GND
LED
to GND
Follow along on your ESP32
:
For Example
# analog in to pw...
ESP32
3V
ESP32
34
ESP32
GND
LED
to GND
Follow along on your ESP32
:
For Example
# analog in to pw...
Analog to Digital Conversion
(ADC
) is the process of converting a varying voltage
(analog
) to a sequence of discrete voltages
(digital
). MicroPython
provides a convenient interface for this via ADC
, which can be used on any pin whose number is prep...