Micro:bit analog pins
Besides having onboard sensors, micro: bit also facilitates integrating sensors using pins. The sensors can be connected as an input device (i.e., to feed the data into the Micro:bit – for example, a temperature sensor) or as an output device (i.e., the data or command coming from the Micro:bit to affect the outside world, such as operating a motor). The analog signal plays a vital role in handling the sensors. In Figure 9.1, the Micro:bit board is presented, showing the analog pins – that is, P0, P1, P2, P4, and P10. These pins are used to handle analog inputs:
Figure 9.1 – Analog pins in Micro:bit (courtesy: https://microbit-micropython.readthedocs.io/en/v1.0.1/pin.html)
The analog signals are continuous signals represented in the form of sinusoidal waves with a continuous range of values. By contrast, digital signals are represented by square waves and have values of 1 or 0 (high or low). The pin selection is based...