Working with Acceleration and Direction
In the previous chapter, we learned about the concepts of analog input and pulse-width modulation. We worked with analog devices such as potentiometers, photoresistors, and servo motors. We demonstrated their workings with the help of MicroPython examples in the previous chapter.
This chapter will explore the Micro:bit’s onboard components, such as an accelerometer and compass. We will design examples to understand the functioning of these onboard components. We will investigate the method of data storage in a local drive. We will also explore how to plot graphs for the data coming through an accelerometer. The methods involved in this chapter will be essential to handling complex hardware and data patterns. The following is the list of topics we will investigate and demonstrate in this chapter:
- Accelerometers
- Data logging and plotting
- Compasses
- Combining audio with a compass
Let’s explore them together...