Summary
In this chapter, we have explored the functioning of analog input-output devices with the help of the Micro:bit. We have demonstrated that using the built-in methods, read_analog()
and write_analog()
, we can print the input values and pass them to an analog device connected to the micro: bit. The functionality of the potentiometer as a variable resistor and voltage divider has been observed. We have completed the calculations required to convert the integer values from the potentiometer into the resistance and voltage levels. We have gone through the working principles and programming of the RGB LED, servomotor, photoresistor, and joystick.
In the next chapter, we will explore using more complex input-output devices such as accelerometers and compasses with the Micro:bit. We will design the program to explore the capabilities of these devices in real-life scenarios.