Data logging
Figure 10.3 only shows the changes in the x axis data. Just one axis is insufficient for making effective decisions, such as fall detection, pitches, yaws, and rolls. We need to collect data from the x, y, and z axes. This data will make interpretation more accurate and reliable, as fall patterns can’t be analyzed just from one axis. Hence, it is essential to have data stored in a file so it can be used for analysis. Data logging is a method of storing the data coming from sensors, actuators, or any subsystems to keep a record, which will further help decision-making and monitoring. Data visualization is equally essential; it is easier to observe the significant changes via graphs and figures.
In the following program, the movement of the Micro:bit board is recorded with the help of an accelerometer. Based on the tilt, we are displaying the image on an LED array display:
from microbit import * while True: sleep(120) ...