Blog 2 - HRV Demo
Lab 2 - Simple Heartrate Sensor Demo
For the second lab, our task was to explore the capabilities of the Micro-Bit platform by connecting an external sensor to the microcontroller through its' GPIO pins. Readings were aquired through a simple serial read script created in Microsoft Makecode.
In this case, the external sensor measures heart rate / pulse by shining a bright green LED light into skin tissue and measuring the light reflected back. As the heart circulates blood around the body, a small variation in pressure occurs within blood vessels, arteries and capillaries. This pressure variation can absorb more or less light at various stages of the heartbeat and is the primary mechanism of the HRV sensor. By detecting fluctuations in light reflected back from the body, it is possible to get an acurate reading on our heartbeat. A similar mechanism of measuring bloodflow is used in other 'smart' technology such as smart watches, fitness bracelets and even in professional medical equiptment.
This script is essentially an infinite while loop that polls the microcontroller for updates on the GPIO pin P0 and outputs the data via the microbit's serial interface.
Comments
Post a Comment