The world we live comprises of many analog signals. A lot of inputs that we can perceive are analog. For example, sounds are analog signals. Measuring our heartbeat requires processing analog sensor information. On the other hand, there are also digital signals. While the actual electrical signals in computer are analog, their representation is digital. That is to say, the information is represented using digital bits. This representation enables efficient processing and storage of signals and information. There needs to be a way to translate signals from the physical world into the digital world of electronics, and vice versa. 
00:00
To understand this, let's first talk a little bit about voltage. It is by far the most common form of analog output in electronics. An analog voltage output can be connected to an analog input, as long as other requirements are met. For example, sufficient current and a compatible range. Some examples can be seen in your home's light source or op-amp that amplifies an audio system.
00:00
In electronics, we usually require analog to digital conversion. Digital or binary here means an output that can be in only one of two states: a logic HIGH (1) or logic LOW (0). It is here where we'll require the use of an analog to digital converter (ADC).
00:00
Usually, the analog voltage output from a sensor module can be converted by an external ADC. Sometimes, a microcontroller already has a built-in ADC. This is the case for the Raspberry Pi Pico.
00:00
On the other hand, to turn a digital into an analogue signal you would require the use of a digital-to-analogue converter (DAC). However, there is a way to "fake" an analogue signal. This can be done through pulse-width modulation (PWM). We've already used this in the previous lesson when using a buzzer.  In this guide we will be focusing on ADCs.
00:00
main.py
xxx
Terminal
screen /dev/tty.usbmodem0000000000001 115200
>>> led = Pin(25, Pin.OUT)
>>> from machine import Pin
Breadboard
Breadboard
Mark
© 2022 Chick Commerce Pty Ltd