Are you over 18 and want to see adult content?
More Annotations
A complete backup of quickaccesspopup.com
Are you over 18 and want to see adult content?
A complete backup of mycornerofthesky.weebly.com
Are you over 18 and want to see adult content?
A complete backup of schwarzaufweiss.de
Are you over 18 and want to see adult content?
A complete backup of 59rs.blogspot.com
Are you over 18 and want to see adult content?
A complete backup of camuflagemairsoft.com.br
Are you over 18 and want to see adult content?
A complete backup of nightlifemadrid.com
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of vezi95.blogspot.com
Are you over 18 and want to see adult content?
A complete backup of monster-wiki.com
Are you over 18 and want to see adult content?
A complete backup of henk-fftopbcn.tumblr.com
Are you over 18 and want to see adult content?
A complete backup of giornalelavoce.it
Are you over 18 and want to see adult content?
A complete backup of ectober-comic.tumblr.com
Are you over 18 and want to see adult content?
A complete backup of scotland.police.uk
Are you over 18 and want to see adult content?
Text
ARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05 The relay switch controls the power to the light bulb, the HC-05 handles the Bluetooth, and the Uno reads the Bluetooth module to control the relay. The tools implemented can be extrapolated to other projects such as automated blinds, temperature controlled fans, motion sensors, security cameras, smoke detectors, etc. YouTube. JoshuaHrisko.
PYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to RASPBERRY PI PICO OLED DISPLAY (SSD1306) The Raspberry Pi Pico microcontroller and SSD1306 OLED display are the central components used in this tutorial, while a Raspberry Pi 4 computer is recommended for interfacing and programming on the Pico. A breadboard and some jumper wires will be helpful as well, and any sensor or motor that may be used in parallel with the SSD1306. The full parts list used to follow along with this ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. RASPBERRY PI CAMERA PANNING WITH A SERVO MOTOR In this tutorial, the RPi is used to demonstrate pulse-width modulation (PWM) and apply it to servo motor control. Then, the servo is used to control the panning of a camera - which is also controlled by the native camera port on the Raspberry Pi. This tutorial is a simple introduction that can be MINI BREADBOARD ENCLOSURE An enclosure can be an important asset when prototyping with Arduino boards and sensors. The mini breadboard enclosure is useful for smaller projects, where the user can cover the wiring and pinouts from sensors and microcontrollers. The enclosure has a removable lid that makes it easy to alter wiri ARDUINO LORA NETWORK PART I: RADIO BASICS AND RANGE TESTS LoRa is a long range wireless radio technology that is applicable where Bluetooth and WiFi are unavailable or incapable of transmission, particularly over large distances.The LoRa framework harnesses high power, low frequency communication to transmit smaller packets of information. LoRa modules, such as the SX1276 used in this tutorial, are also widely available and relatively inexpensiveARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05 The relay switch controls the power to the light bulb, the HC-05 handles the Bluetooth, and the Uno reads the Bluetooth module to control the relay. The tools implemented can be extrapolated to other projects such as automated blinds, temperature controlled fans, motion sensors, security cameras, smoke detectors, etc. YouTube. JoshuaHrisko.
PYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to THERMAL CAMERA ANALYSIS WITH RASPBERRY PI The AMG8833 infrared thermopile array is a 64-pixel (8x8) detector that approximates temperature from radiative bodies. The module is wired to a Raspberry Pi 4 computer and communicates over the I2C bus at 400kHz to send temperature from all VISUALIZING COVID-19 DATA IN PYTHON A lot of data surrounding COVID-19 cases are scattered throughout the web, along with various visualizations and figures. This blog post is aimed at creating meaningful visualizations that may or may not be available elsewhere, while instructing users on how to source, analyze, and visualize COVID-19 infection case and rate data usingPython.
RASPBERRY PI STEPPER MOTOR CONTROL WITH NEMA 17 A NEMA 17 stepper motor (model: 17HS4023) is wired to a DRV8825 stepper controller, which is subsequently wired to a Raspberry Pi 4 Model B.The NEMA 17 HS4023 motor also requires a 12V power supply with at least 2 amps of current to operate at peak torque. The following parts list is the minimum for following along with this tutorial: ARDUINO LORA NETWORK PART I: RADIO BASICS AND RANGE TESTS LoRa is a long range wireless radio technology that is applicable where Bluetooth and WiFi are unavailable or incapable of transmission, particularly over large distances.The LoRa framework harnesses high power, low frequency communication to transmit smaller packets of information. LoRa modules, such as the SX1276 used in this tutorial, are also widely available and relatively inexpensive ACCELEROMETER, GYROSCOPE, AND MAGNETOMETER ANALYSIS WITH The MPU9250 is a powerful inertial measurement unit consisting of three primary sensors: an accelerometer, a gyroscope, and a magnetometer.Each sensor measures a 3-axis signal in the cartesian reference x,y,z. Each of the 9-degrees of freedom is converted into a 16-bit digital signal, which can be read at different speeds dependingon the sensor.
IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05 The relay switch controls the power to the light bulb, the HC-05 handles the Bluetooth, and the Uno reads the Bluetooth module to control the relay. The tools implemented can be extrapolated to other projects such as automated blinds, temperature controlled fans, motion sensors, security cameras, smoke detectors, etc. YouTube. JoshuaHrisko.
BLUETOOTH MODULE WITH ARDUINO (AT-09, MLT-BT05, HM-10 In this tutorial, I will dive into the variations of CC2541 BLE board such as the AT-09, MLT-BT05, HM-10, JDY-08, etc. I will use either the specific module name or a blanketed “CC2541-based module” reference to refer to the BLE modules. The general process for interfacing with each module isPYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to theserial
CAPACITIVE TOUCH SENSOR WITH ARDUINO This will allow us to create a switch without any moving parts and requires only an Arduino board and one of the capacitive touch sensors shown below. The following parts are used in this tutorial: Arduino Uno - $10.86 Capacitive Touch Sensor - $6.99 LED - ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. MINI BREADBOARD ENCLOSURE An enclosure can be an important asset when prototyping with Arduino boards and sensors. The mini breadboard enclosure is useful for smaller projects, where the user can cover the wiring and pinouts from sensors and microcontrollers. The enclosure has a removable lid that makes it easy to alter wiri RASPBERRY PI CAMERA PANNING WITH A SERVO MOTOR In this tutorial, the RPi is used to demonstrate pulse-width modulation (PWM) and apply it to servo motor control. Then, the servo is used to control the panning of a camera - which is also controlled by the native camera port on the Raspberry Pi. This tutorial is a simple introduction that can be MANOMETER — RASPBERRY PI, ARDUINO, AND ENGINEERING Pressure is defined as an evenly distributed force acting over a surface with a given area. The accurate measurement of pressure is essential for applications ranging from material testing to weighing scales, aircraft altitude prediction, and evaluating biological functions in humans relating to respiration and blood flow In this tutorial, a digital pressure transducer and analog pressureARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05ARDUINO RELAY SWITCH CODEHOW TO USE ARDUINO RELAY The relay switch controls the power to the light bulb, the HC-05 handles the Bluetooth, and the Uno reads the Bluetooth module to control the relay. The tools implemented can be extrapolated to other projects such as automated blinds, temperature controlled fans, motion sensors, security cameras, smoke detectors, etc. YouTube. JoshuaHrisko.
REAL-TIME GRAPHING IN PYTHON Real-Time Graphing in Python. In data visualization, real-time plotting can be a powerful tool to analyze data as it streams into the acquisition system. Whether temperature data, audio data, stock market data, or even social media data - it is often advantageous to monitor data in real-time to ensure that instrumentation and algorithms are IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software.PYTHON DATALOGGER
Serial ( '/dev/ttyACM0' ) ser_bytes = ser. readline () These three simple lines read a single row of data from the serial port. In the case of Raspberry Pi, the serial port (on my Arduino) is located at '/dev/ttyACM0'. You may also find yours there, or at an integer increment (ttyACM1, ttyACM2, etc.), or perhaps a different addresscompletely.
ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. MINI BREADBOARD ENCLOSURE An enclosure can be an important asset when prototyping with Arduino boards and sensors. The mini breadboard enclosure is useful for smaller projects, where the user can cover the wiring and pinouts from sensors and microcontrollers. The enclosure has a removable lid that makes it easy to alter wiri RASPBERRY PI CAMERA PANNING WITH A SERVO MOTOR In this tutorial, the RPi is used to demonstrate pulse-width modulation (PWM) and apply it to servo motor control. Then, the servo is used to control the panning of a camera - which is also controlled by the native camera port on the Raspberry Pi. This tutorial is a simple introduction that can be MANOMETER — RASPBERRY PI, ARDUINO, AND ENGINEERING Pressure is defined as an evenly distributed force acting over a surface with a given area. The accurate measurement of pressure is essential for applications ranging from material testing to weighing scales, aircraft altitude prediction, and evaluating biological functions in humans relating to respiration and blood flow In this tutorial, a digital pressure transducer and analog pressureARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05ARDUINO RELAY SWITCH CODEHOW TO USE ARDUINO RELAY The relay switch controls the power to the light bulb, the HC-05 handles the Bluetooth, and the Uno reads the Bluetooth module to control the relay. The tools implemented can be extrapolated to other projects such as automated blinds, temperature controlled fans, motion sensors, security cameras, smoke detectors, etc. YouTube. JoshuaHrisko.
REAL-TIME GRAPHING IN PYTHON Real-Time Graphing in Python. In data visualization, real-time plotting can be a powerful tool to analyze data as it streams into the acquisition system. Whether temperature data, audio data, stock market data, or even social media data - it is often advantageous to monitor data in real-time to ensure that instrumentation and algorithms are IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software.PYTHON DATALOGGER
Serial ( '/dev/ttyACM0' ) ser_bytes = ser. readline () These three simple lines read a single row of data from the serial port. In the case of Raspberry Pi, the serial port (on my Arduino) is located at '/dev/ttyACM0'. You may also find yours there, or at an integer increment (ttyACM1, ttyACM2, etc.), or perhaps a different addresscompletely.
ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. BLEXAR — MAKER PORTAL BLExAR is an integrated app that uses Bluetooth Low Energy to convert your Arduino Uno board into an iOS-compatible device. BLExAR allows the iOS user to control all digital and analog pins on an ATmega328 Arduino-based board using just a CC2541 (HM-10) Bluetooth board. Some features include: Real-time control of all Arduino pins, data plotting RASPBERRY PI CAMERA PANNING WITH A SERVO MOTOR In this tutorial, the RPi is used to demonstrate pulse-width modulation (PWM) and apply it to servo motor control. Then, the servo is used to control the panning of a camera - which is also controlled by the native camera port on the Raspberry Pi. This tutorial is a simple introduction that can beARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. REAL-TIME GRAPHING IN PYTHON Real-Time Graphing in Python. In data visualization, real-time plotting can be a powerful tool to analyze data as it streams into the acquisition system. Whether temperature data, audio data, stock market data, or even social media data - it is often advantageous to monitor data in real-time to ensure that instrumentation and algorithms are ARDUINO PITOT TUBE WIND SPEED AND AIRSPEED INDICATOR Named after its french creator, Henri Pitot, the pitot tube is a device used to approximate the speed of vehicles traveling by air and water.An in-depth article on NASA's website is dedicated to pitot tubes (also called pitot-static tubes, Prandtl tubes), where it cites the primary application as airspeed indicator on aircraft. For more information on design and limitations of the instrumentARDUINO TACHOMETER
Arduino tachometer used to calculate the rotational motion of a part. Tachometers read out revolutions per minute (RPM), which tells the user how often a rotating part completes one full rotation. RPM readings are used in the automotive, aerospace, and ARDUINO SD CARD MODULE DATA LOGGER This tutorial will explore the range of capabilities available to the Arduino SD library by using a real-world example of data logging. The SD library allows users to read/write, list files, create/remove files, and make/delete directories. Additionally, we will develop an algorithm that creates a n USING RASPBERRY PI, HM-10, AND BLUEPY TO DEVELOP AN Bluetooth Module - $8 (HM-10 breakout), $5 (CC2541a ), $4 (HM-10 unsoldered)3.7V/600mAh LiPo Battery w/USB Charger - $15.00 - Other Items - Raspberry Pi 4 Computer - $55.00 Arduino Uno Board - $13.00 NOTE: One common mistake when buying a BLE HM-10 bluetooth module is mistaking a counterfeit board for a real one.The way to tell a counterfeit board from a real BLEXAR — MAKER PORTAL BLExAR Arduino + Bluetooth. BLExAR is an integrated app that uses Bluetooth Low Energy to convert your Arduino Uno board into an iOS-compatible device. BLExAR allows the iOS user to control all digital and analog pins on an ATmega328 Arduino-based board using just a CC2541 (HM-10) Bluetooth board. RASPBERRY PI PICO OLED DISPLAY (SSD1306) The Raspberry Pi Pico microcontroller and SSD1306 OLED display are the central components used in this tutorial, while a Raspberry Pi 4 computer is recommended for interfacing and programming on the Pico. A breadboard and some jumper wires will be helpful as well, and any sensor or motor that may be used in parallel with the SSD1306. The full parts list used to follow along with this ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. MINI BREADBOARD ENCLOSURE An enclosure can be an important asset when prototyping with Arduino boards and sensors. The mini breadboard enclosure is useful for smaller projects, where the user can cover the wiring and pinouts from sensors and microcontrollers. The enclosure has a removable lid that makes it easy to alter wiriARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART REAL-TIME GRAPHING IN PYTHON Notice how in the above script, I do not re-plot the x-axis data. This enables us to quickly update the y-data. This is the fast-moving advantage of the line1.set_ydata(y1_data) method as opposed to the traditional plt.plot() method.The script above could also be used to update both x and y data, but more issues arise when handling both xand y movement.
IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05ARDUINO RELAY SWITCH CODEHOW TO USE ARDUINO RELAY I used an HC-05 Bluetooth module, a relay switch, a light bulb switch, and an Arduino Uno to create a wireless home automation light switch. The goal was to establish a wireless protocol for switching a light bulb on and off using a simple app on a smartphone. The relay switchcontrols the
PYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to BLEXAR — MAKER PORTAL BLExAR Arduino + Bluetooth. BLExAR is an integrated app that uses Bluetooth Low Energy to convert your Arduino Uno board into an iOS-compatible device. BLExAR allows the iOS user to control all digital and analog pins on an ATmega328 Arduino-based board using just a CC2541 (HM-10) Bluetooth board. RASPBERRY PI PICO OLED DISPLAY (SSD1306) The Raspberry Pi Pico microcontroller and SSD1306 OLED display are the central components used in this tutorial, while a Raspberry Pi 4 computer is recommended for interfacing and programming on the Pico. A breadboard and some jumper wires will be helpful as well, and any sensor or motor that may be used in parallel with the SSD1306. The full parts list used to follow along with this ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use. MINI BREADBOARD ENCLOSURE An enclosure can be an important asset when prototyping with Arduino boards and sensors. The mini breadboard enclosure is useful for smaller projects, where the user can cover the wiring and pinouts from sensors and microcontrollers. The enclosure has a removable lid that makes it easy to alter wiriARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART REAL-TIME GRAPHING IN PYTHON Notice how in the above script, I do not re-plot the x-axis data. This enables us to quickly update the y-data. This is the fast-moving advantage of the line1.set_ydata(y1_data) method as opposed to the traditional plt.plot() method.The script above could also be used to update both x and y data, but more issues arise when handling both xand y movement.
IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software. IMAGE PROCESSING WITH RASPBERRY PI AND PYTHON The Raspberry Pi has a dedicated camera input port that allows users to record HD video and high-resolution photos. Using Python and specific libraries written for the Pi, users can create tools that take photos and video, and analyze them in real-time or save them for later processing. In this tuto BLUETOOTH HOME AUTOMATION LIGHT BULB SWITCH USING AN HC-05ARDUINO RELAY SWITCH CODEHOW TO USE ARDUINO RELAY I used an HC-05 Bluetooth module, a relay switch, a light bulb switch, and an Arduino Uno to create a wireless home automation light switch. The goal was to establish a wireless protocol for switching a light bulb on and off using a simple app on a smartphone. The relay switchcontrols the
PYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to BLEXAR — MAKER PORTAL BLExAR Arduino + Bluetooth. BLExAR is an integrated app that uses Bluetooth Low Energy to convert your Arduino Uno board into an iOS-compatible device. BLExAR allows the iOS user to control all digital and analog pins on an ATmega328 Arduino-based board using just a CC2541 (HM-10) Bluetooth board. ARDUINO SERVO MOTOR BASICS AND CONTROL The SG90 (datasheet here) is a 9 gram servo motor that can rotate 0 - 180 degrees (roughly) at a rate of about 0.3 seconds (0.1s/60 degrees).The SG90 is used in low-cost projects, typically with motorized vehicles and robotic arms. The SG90 is a great tool for education and prototyping - as it is inexpensive and easy-to-use.ARDUINO GPS TRACKER
The NEO-6 is a miniature GPS module designed by u-blox to receive updates from up to 22 satellite on 50 different channels that use trilateration to approximate fixed position of a receiver device every second (or less, for some modules). The particular module used in this tutorial, the NEO-6M, is capable of updating its position every second and communicates with an Arduino board using UART RASPBERRY PI CAMERA PANNING WITH A SERVO MOTOR In this tutorial, the RPi is used to demonstrate pulse-width modulation (PWM) and apply it to servo motor control. Then, the servo is used to control the panning of a camera - which is also controlled by the native camera port on the Raspberry Pi. This tutorial is a simple introduction that can be VENTURI TUBE FLOW METER KIT A venturi tube is a measurement device that uses the pressure differential between two sections that differ in diameter. Using Bernoulli’s principle, the velocity and flow rate can be approximated from the pressure differential measured across the two areas within the venturi tube. The venturi tube IOS AND ARDUINO BLUETOOTH COMMUNICATION USING THE BLEXAR An app called BLExAR allows Arduino users to communicate to an iOS device (iPhone or iPad) using a Bluetooth CC2541 module (different versions are called: HM-10, SH-M08, AT-09, or JDY-08). The app permits control of an Arduino board, wireless serial communication, and data acquisition. Click on the app logo shown here to download the app, as it will be used as the iOS communication software.PYTHON DATALOGGER
NOTE: I will be using a DHT11 temperature sensor to produce data on the Arduino end. Since this is a tutorial on reading data from the serial port using Python, not Arduino, I recommend visiting a DHT11 tutorial to learn how to print temperature data from the sensor to theserial
ARDUINO PITOT TUBE WIND SPEED AND AIRSPEED INDICATOR Named after its french creator, Henri Pitot, the pitot tube is a device used to approximate the speed of vehicles traveling by air and water.An in-depth article on NASA's website is dedicated to pitot tubes (also called pitot-static tubes, Prandtl tubes), where it cites the primary application as airspeed indicator on aircraft. For more information on design and limitations of the instrument ARDUINO SD CARD MODULE DATA LOGGER This tutorial will explore the range of capabilities available to the Arduino SD library by using a real-world example of data logging. The SD library allows users to read/write, list files, create/remove files, and make/delete directories. Additionally, we will develop an algorithm that creates a n ARDUINO WALL-PENETRATING MOTION SENSOR USING THE RCWL-0516 The RCWL-0516 is a microwave sensor that uses doppler technology in the 3.2GHz range to detect the motion of nearby moving objects. The onboard signal processing chip, RCWL-9196, uses the difference between the emitted frequency and the reflected frequency to notify whetherthere is
Cart 0
Main Portal Raspberry Pi ArduinoEngineering
Programming Blog Shop ContactAbout Consulting
Search
Back - All Products - New and PopularMicrocontrollers
Raspberry Pi
Engineering Kits Internet of ThingsSensors Motors
+ Actuators Data AcquisitionMaker Tools
BLExAR Resources WaWiCo Blog Shop - All Products - New and Popular MicrocontrollersRaspberry Pi
Engineering Kits Internet of ThingsSensors Motors
+ Actuators Data AcquisitionMaker Tools
BLExAR Resources WaWiCo ContactAbout Consulting
Search
Main Portal Raspberry Pi ArduinoEngineering
Programming
Cart 0
ARDUINO HEART RATE MONITOR USING MAX30102 AND PULSE OXIMETRY _“As an Amazon Associates Program member, clicking on links may result in Maker Portal receiving a small commission that helps support future projects.” _Introduction
Parts List and Wiring MAX30102 Arduino Library Saving MAX30102 Data with Python Fast Fourier Transform to Approximate Heart Rate Applying a Gradient Approximation to Find Heart RateConclusion
Pulse oximetry monitors the oxygen saturation in blood by measuring the magnitude of reflected red and infrared light . Pulse oximeteters can also approximate heart rate by analyzing the time series response of the reflected red and infrared light . The MAX30102 pulse oximeter is an Arduino-compatible and inexpensive sensor that permits calculation of heart rate using the method described above. In this tutorial, the MAX30102 sensor will be introduced along with several in-depth analyses of the red and infrared reflection data that will be used to calculate parameters such as heart rate and oxygen saturation in blood. ------------------------- PARTS LIST AND WIRING The primary components needed for this tutorial are the MAX30102 pulse oximeter and an Arduino microcontroller. I will also be using a Raspberry Pi to read high-speed serial data printed out by the Arduino. I’m using the Raspberry Pi because I will be analyzing the pulse data with robust Python programs and libraries that are not available on the Arduino platform. The parts list for the experimentsis shown below:
*
MAX30102 Pulse Oximeter - $13.00*
Arduino Uno - $11.00*
Raspberry Pi + 8GB SD Card - $41.99*
Jumper Wires - $5.99 (120 pcs)*
Mini Breadboard - $3.00Quick View
MAX30102 Heart Rate and Pulse Oximeter Sensor13.00
Quantity:
Add To Cart
Tutorial-Related PicksAds by Amazon
LoveRPi Raspberry Pi 3 B+ 8GB Raspbian Quick Start KitBestseller
(136)
DEAL OF THE DAY
ENDS IN
HiLetgo 120pcs/3x40pcs Breadboard Jumper Wir…$5.99
Bestseller
(256)
DEAL OF THE DAY
ENDS IN
ELEGOO Upgraded 37 in 1 Sensor Modules Kit wi…$34.99
Bestseller
(1262)
DEAL OF THE DAY
ENDS IN
Programming the Raspber…$14.25$15.00
Bestseller
(484)
DEAL OF THE DAY
ENDS IN
Ads by Amazon
The MAX30102 uses two-wire I2C communication to interface with Arduino Uno board. I use the I2C ports on the A4/A5 ports on the Arduino board. The wiring is shown below: ------------------------- MAX30102 ARDUINO LIBRARY Sparkfun has a library that handles the communication between Arduino and MAX30102. We will be using the Sparkfun library to handle high-speed readout of the red and IR reflectance data.In the Arduino IDE:
*
Go to Sketch -> Include Library -> Manage Libraries*
Type in “max30” into the search bar*
Download the “Sparkfun MAX3010x Pulse and Proximity SensorLibrary”
A simple high-speed setup based around the Arduino Uno is shown below. It samples the MAX30102 at 400 Hz and prints to the serial port. At 400 Hz and a serial baud rate of 115200, the Raspberry Pi is capable of reading each data point without issues.#include
#include "MAX30105.h" MAX30105 particleSensor; // initialize MAX30102 with I2C void setup()
{
Serial.begin(115200); while(!Serial); //We must wait for Teensy to come onlinedelay(100);
Serial.println("");
Serial.println("MAX30102");Serial.println("");
delay(100);
// Initialize sensor if (particleSensor.begin(Wire, I2C_SPEED_FAST) == false) //Use default I2C port, 400kHz speed{
Serial.println("MAX30105 was not found. Please check wiring/power. ");while (1);
}
byte ledBrightness = 70; //Options: 0=Off to 255=50mA byte sampleAverage = 1; //Options: 1, 2, 4, 8, 16, 32 byte ledMode = 2; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green int sampleRate = 400; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200 int pulseWidth = 69; //Options: 69, 118, 215, 411 int adcRange = 16384; //Options: 2048, 4096, 8192, 16384 particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); //Configure sensor with these settings}
void loop() {
particleSensor.check(); //Check the sensor while (particleSensor.available()) { // read stored IR Serial.print(particleSensor.getFIFOIR());Serial.print(",");
// read stored red Serial.println(particleSensor.getFIFORed()); // read next set of samples particleSensor.nextSample();}
}
With a finger attached to the MAX30102 (either by rubber band, tape, or encapulation), the printout to the Arduino serial plotter shouldlook as follows:
View fullsize
We don’t need to worry about the inability to track the shape of each plot, as we will read these into Python using the serial reader and fully analyze the red and IR data from the MAX30102 sensor. In the next section, we will be reading the real-time 400 Hz data into Python and analyzing the data using several complex algorithms ranging from frequency domain analysis and wavelet analysis. ------------------------- SAVING MAX30102 DATA WITH PYTHON We can read the Arduino serial output data on the Raspberry Pi using Python’s serial library. In the Arduino code above, the only change we need to make is to add a printout of the ‘micros()’ function to attach a timestamp to the data readings of red and IR reflectivity values. The Arduino code is shown below:#include
#include "MAX30105.h" MAX30105 particleSensor; // initialize MAX30102 with I2C void setup()
{
Serial.begin(115200); while(!Serial); //We must wait for Teensy to come onlinedelay(100);
Serial.println("");
Serial.println("MAX30102");delay(100);
// Initialize sensor if (particleSensor.begin(Wire, I2C_SPEED_FAST) == false) //Use default I2C port, 400kHz speed{
Serial.println("MAX30105 was not found. Please check wiring/power. ");while (1);
}
byte ledBrightness = 70; //Options: 0=Off to 255=50mA byte sampleAverage = 1; //Options: 1, 2, 4, 8, 16, 32 byte ledMode = 2; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green int sampleRate = 400; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200 int pulseWidth = 69; //Options: 69, 118, 215, 411 int adcRange = 16384; //Options: 2048, 4096, 8192, 16384 particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); //Configure sensor with these settings}
void loop() {
particleSensor.check(); //Check the sensor while (particleSensor.available()) { // read stored IR Serial.print(micros());Serial.print(",");
Serial.print(particleSensor.getFIFOIR());Serial.print(",");
// read stored red Serial.println(particleSensor.getFIFORed()); // read next set of samples particleSensor.nextSample();}
}
A high-speed serial readout algorithm for Python is shown below for reading the Arduino serial printout values. The Python code will acquire the data and save it into a .csv file for later analysis. The reason why we save them right away is that the data is coming in at such high speeds that we want to minimize the amount of processing done in-between the serial acquisitions. This code for saving the Arduino printout data in Python is shown below: import serial,time,csv,os import numpy as np import matplotlib.pyplot as plt from matplotlib import cm plt.style.use('ggplot') ## initialize serial port (ttyUSB0 or ttyACM0) at 115200 baud rate ser = serial.Serial('/dev/ttyUSB0',baudrate=115200)
## set filename and delete it if it already exists datafile_name = 'test_data.csv' if os.path.isfile(datafile_name): os.remove(datafile_name) ## looping through serial prints and wait for restart of Arduino Uno ## with start word "MAX30102"all_data =
start_word = Falsewhile True:
try:
curr_line = ser.readline() # read line if start_word == False: if curr_line==b'MAX30102':start_word = True
print("Program Start")continue
else:
continue
all_data.append(curr_line) # append to data vector except KeyboardInterrupt:break
print("Exited Loop") # looping through data vector and removing bad data # then, create vectors for time, red, and IR variables t_vec,ir_vec,red_vec = ,, ir_prev,red_prev = 0.0,0.0 for ii in range(3,len(all_data)):try:
curr_data = (all_data).decode("utf-8").split(',')except:
continue
if len(curr_data)==3: if abs((float(curr_data)-ir_prev)/float(curr_data))>1.01 or\ abs((float(curr_data)-red_prev)/float(curr_data))>1.01:continue
t_vec.append(float(curr_data)/1000000.0) ir_vec.append(float(curr_data)) red_vec.append(float(curr_data)) ir_prev = float(curr_data) red_prev = float(curr_data) print('Sample Rate: {0:2.1f}Hz'.format(1.0/np.mean(np.abs(np.diff(t_vec)))))## saving data
with open(datafile_name,'a') as f: writer = csv.writer(f,delimiter=',') for t,x,y in zip(t_vec,ir_vec,red_vec):writer.writerow()
## plotting data vectors fig = plt.figure(figsize=(12,8)) ax1 = fig.add_subplot(111) ax1.set_xlabel('Time ',fontsize=24) ax1.set_ylabel('IR Amplitude',fontsize=24,color='#CE445D',labelpad=10) ax1.tick_params(axis='both',which='major',labelsize=16) plt1 = ax1.plot(t_vec,ir_vec,label='IR',color='#CE445D',linewidth=4) ax1_2 = plt.twinx()ax1_2.grid('off')
ax1_2.set_ylabel('Red Amplitude',fontsize=24,color='#37A490',labelpad=10) ax1_2.tick_params(axis='y',which='major',labelsize=16) plt2 = ax1_2.plot(t_vec,red_vec,label='Red',color='#37A490',linewidth=4)lns = plt1+plt2
labels =
ax1_2.legend(lns,labels,fontsize=16)plt.xlim()
plt.tight_layout(pad=1.2) plt.savefig('max30102_python_example.png',dpi=300,facecolor=)plt.show()
The final plot produced by the Python code above should look asfollows:
View fullsize
In the next section, I will explore several methods for analyzing the time series data shown in the plot above. I will also discuss some frequency domain and wavelet analyses for determining periodicity of pulses for heart rate approximation and blood oxygenation. ------------------------- FAST FOURIER TRANSFORM TO APPROXIMATE HEART RATE Below are a few links to scientific research that has been conducted on pulse oximetry and the relationship to oxygenation in thecirculatory system:
*
Pulse oximetry: Understanding its basic principles facilitates appreciation of its limitations*
Accuracy of Pulse Oximeters in Estimating Heart Rate at Rest andDuring Exercise
*
Calibration-Free Pulse Oximetry Based on Two Wavelengths in the Infrared — A Preliminary Study*
Pulse Oximeter Fundamentals and Design*
Simultaneous Measurement of Oxygenation and Carbon Monoxide Saturation Using Pulse Oximetry In this section, I will introduce the basic relationship between red and infrared reflectance values measured by the MAX30102 pulse oximeter and heart rate. In the publication entitled “Calibration-Free Pulse Oximetry Based on Two Wavelengths in the Infrared — A Preliminary Study,” the following figure is presented as a PPG pulse where the light transmitted through tissue is shown to decreases during an event called the systole (the heart contracts and pumps blood from its chambers to the arteries), and increases during diastole (heart relaxes and its chambers fill with blood). From: CALIBRATION-FREE PULSE OXIMETRY BASED ON TWO WAVELENGTHS IN THE INFRARED — A PRELIMINARY STUDY: The PPG pulse. The transmitted light through the tissue decreases during systole and increases during diastole. IDand IS represent the maximal and minimal light transmission through the tissue. If we were to zoom in on one of our MAX30102 pulses, we would see nearly the exact same profile in the red and IR responses: We can use this cyclic behavior to approximate the interval between heart ‘beats’ to determine the rough heart rate of an individual. The simplest way to calculate the heart rate is to record a few seconds of red or infrared reflectance data and calculate the dominant frequency content of the signal. If we use Python’s Fast Fourier Transform (FFT in Numpy), the peak of the FFT approximates the frequency of the heart’s contraction and relaxation cycle - what we call the heart rate. THE SIMPLEST WAY TO CALCULATE THE HEART RATE IS TO RECORD A FEW SECONDS OF RED OR INFRARED REFLECTANCE DATA AND CALCULATE THE DOMINANT FREQUENCY CONTENT OF THE SIGNAL. The code and plot below show the FFT method for approximating heart rate for a 9 second sample of MAX30102 data.View fullsize
import csv
import numpy as np import matplotlib.pyplot as plt plt.style.use('ggplot') ## reading data saved in .csv file t_vec,ir_vec,red_vec = ,, with open('test_data.csv',newline='') as csvfile: csvreader = csv.reader(csvfile,delimiter=',') for row in csvreader: t_vec.append(float(row)) ir_vec.append(float(row)) red_vec.append(float(row)) s1 = 0 # change this for different range of data s2 = len(t_vec) # change this for ending range of data t_vec = np.array(t_vec)ir_vec = ir_vec
red_vec = red_vec
# sample rate and heart rate ranges samp_rate = 1/np.mean(np.diff(t_vec)) # average sample rate for determining peaks heart_rate_range = # BPM heart_rate_range_hz = np.divide(heart_rate_range,60.0) max_time_bw_samps = 1/heart_rate_range_hz # max seconds between beats max_pts_bw_samps = max_time_bw_samps*samp_rate # max points between beats ## plotting time series data fig = plt.figure(figsize=(14,8)) ax1 = fig.add_subplot(111) ax1.set_xlabel('Time ',fontsize=24) ax1.set_ylabel('IR Amplitude',fontsize=24,color='#CE445D',labelpad=10) ax1.tick_params(axis='both',which='major',labelsize=16) plt1 = ax1.plot(t_vec,ir_vec,label='IR',color='#CE445D',linewidth=4) ax1_2 = plt.twinx()ax1_2.grid('off')
ax1_2.set_ylabel('Red Amplitude',fontsize=24,color='#37A490',labelpad=10) ax1_2.tick_params(axis='y',which='major',labelsize=16) plt2 = ax1_2.plot(t_vec,red_vec,label='Red',color='#37A490',linewidth=4)lns = plt1+plt2
labels =
ax1_2.legend(lns,labels,fontsize=16,loc='upper center')plt.xlim()
plt.tight_layout(pad=1.2) ## FFT and plotting frequency spectrum of data f_vec = np.arange(0,int(len(t_vec)/2))*(samp_rate/(len(t_vec)))f_vec = f_vec*60
fft_var = np.fft.fft(red_vec) fft_var = np.append(np.abs(fft_var),2.0*np.abs(fft_var),np.abs(fft_var))
bpm_max_loc = np.argmin(np.abs(f_vec-heart_rate_range))f_step = 1
f_max_loc = np.argmax(fft_var)+f_step print('BPM: {0:2.1f}'.format(f_vec)) fig2 = plt.figure(figsize=(14,8)) ax2 = fig2.add_subplot(111) ax2.loglog(f_vec,fft_var,color=,linewidth=4)ax2.set_xlim()
ax2.set_ylim()
ax2.tick_params(axis='both',which='major',labelsize=16) ax2.set_xlabel('Frequency ',fontsize=24) ax2.set_ylabel('Amplitude',fontsize=24) ax2.annotate('Heart Rate: {0:2.0f} BPM'.format(f_vec), xy = (f_vec,fft_var+(np.std(fft_var)/10)),xytext=(-10,70), textcoords='offset points',arrowprops=dict(facecolor='k'), fontsize=16,horizontalalignment='center') fig2.savefig('max30102_fft_heart_rate.png',dpi=300,facecolor=)plt.show()
From my own experience with this method, I RECOMMEND AT LEAST 8 SECONDS OF REFLECTIVITY DATA FOR CALCULATING A TRUE HEART RATE. Below this, the FFT will start seeing different frequency content in the signal. This could possibly be avoided by filtering, but I haven’tincluded that here.
------------------------- APPLYING A GRADIENT APPROXIMATION TO FIND HEART RATE The difficulty in using the FFT for calculation of heart rate is the required number of cycles. Several cycles are needed for accurate frequency approximation. Therefore, another method is introduced here which uses a second order gradient function to approximate the rate of change of the pulse. Since the steepest point during the circulatory cycle is the systolic point (heart contraction), we can use this fact to develop a peak-finding algorithm that looks for each systolicgradient peak.
The gradient code in Python is shown below. It does the following:*
Record 4 seconds of MAX30102 data*
Smooth the data with a short convolution*
Calculate the gradient with Numpy’s ‘gradient()’ function*
Look for peaks where the systolic gradient is maximum*
Approximate heart rate from period between peaks import serial,time,os import numpy as np import matplotlib.pyplot as plt plt.style.use('ggplot') ser = serial.Serial('/dev/ttyUSB0',baudrate=115200)
start_word = False heart_rate_span = # max span of heart rate pts = 1800 # points used for peak finding (400 Hz, I recommend at least 4s (1600 pts) smoothing_size = 20 # convolution smoothing size # setup live plottingplt.ion()
fig = plt.figure(figsize=(14,8)) ax1 = fig.add_subplot(111) line1, = ax1.plot(np.arange(0,pts),np.zeros((pts,)),linewidth=4,label='Smoothed Data') line2, = ax1.plot(0,0,label='Gradient Peaks',marker='o',linestyle='',color='k',markersize=10) ax1.set_xlabel('Time ',fontsize=16) ax1.set_ylabel('Amplitude',fontsize=16) ax1.legend(fontsize=16) ax1.tick_params(axis='both',which='major',labelsize=16)plt.show()
while True:
t_vec,y_vals = ,
ser.flushInput()
try:
print('Place Finger on Sensor...') while len(y_vals)continue
else:
continue
curr_data = (curr_line).decode("utf-8").split(',') if len(curr_data)==3:try:
t_vec.append(float(curr_data)/1000.0) y_vals.append(float(curr_data))except:
continue
ser.flushInput() # flush serial port to avoid overflow # calculating heart ratet1 = time.time()
samp_rate = 1/np.mean(np.diff(t_vec)) # average sample rate for determining peaks min_time_bw_samps = (60.0/heart_rate_span) # convolve, calculate gradient, and remove bad endpoints y_vals = np.convolve(y_vals,np.ones((smoothing_size,)),'same')/smoothing_size red_grad = np.gradient(y_vals,t_vec) red_grad = np.zeros((int(smoothing_size/2)+1,)) red_grad = np.zeros((int(smoothing_size/2)+1,)) y_vals = np.append(np.repeat(y_vals,int(smoothing_size/2)),y_vals) y_vals = np.append(y_vals,np.repeat(y_vals,int(smoothing_size/2))) # update plot with new Time and red/IR data line1.set_xdata(t_vec) line1.set_ydata(y_vals)ax1.set_xlim()
if line1.axes.get_ylim()<0.95*np.min(y_vals) or\ np.max(y_vals)>line1.axes.get_ylim() or\ np.min(y_vals)plt.pause(0.001)
# peak locator algorithm peak_locs = np.where(red_grad<-np.std(red_grad)) if len(peak_locs)==0:continue
prev_pk = peak_locs true_peak_locs,pk_loc_span = , for ii in peak_locs:y_pk = y_vals
if (t_vec-t_vec)if pk_loc_span==:
true_peak_locs.append(ii)else:
true_peak_locs.append(int(np.mean(pk_loc_span)))pk_loc_span =
prev_pk = int(ii)
t_peaks =
if t_peaks==:
continue
else:
print('BPM: {0:2.1f}'.format(60.0/np.mean(np.diff(t_peaks)))) ax1.set_title('{0:2.0f} BPM'.format(60.0/np.mean(np.diff(t_peaks))),fontsize=24) # plot gradient peaks on original plot to view how BPM is calculated scatter_x,scatter_y = , for jj in true_peak_locs: scatter_x.append(t_vec) scatter_y.append(y_vals) line2.set_data(scatter_x,scatter_y)plt.pause(0.001)
savefig = input("Save Figure? ")if savefig=='y':
plt.savefig('gradient_plot.png',dpi=300,facecolor=) except KeyboardInterrupt:break
The code above plots the 4s section of heart rate data and places black dots over the systolic gradient peak. The period between each successive dot is used to calculate the heart rate using the sample rate. An example output plot is shown below with the BPMapproximation.
-------------------------CONCLUSION
In this tutorial, the MAX30102 pulse oximeter sensor was introduced along with its Arduino-compatible library and basic functionality. The MAX30102 data was then analyzed using Python to approximate the cyclic behavior of the heart’s contraction and relaxation period to measure heart rate. Then, a more accurate and stable gradient analysis of the reflectivity data was used to find peaks in the systolic behavior of the heart to calculate the heart’s periodic frequency. The goal of this tutorial was to demonstrate the power of an inexpensive pulse oximeter for health monitoring, while also exploring advanced methods in data analysis for real-world application. _See More in Arduino and Python:_Featured
Mar 1, 2021
WS2812 LED Ring Light with Raspberry Pi PicoMar 1, 2021
Mar 1, 2021
Feb 12, 2021
Listening to Your Pipes with a MEMS Microphone and Raspberry PiFeb 12, 2021
Feb 12, 2021
Jan 28, 2021
An Introduction to the Raspberry Pi Pico with MicroPythonJan 28, 2021
Jan 28, 2021
Jan 22, 2021
Distance Detection with the TF-Luna LiDAR and Raspberry PiJan 22, 2021
Jan 22, 2021
Jan 18, 2021
Audio Processing with The QuadMic 4-Microphone Array on the RaspberryPi
Jan 18, 2021
Jan 18, 2021
Jan 11, 2021
Calibration of a Magnetometer with Raspberry PiJan 11, 2021
Jan 11, 2021
Jan 3, 2021
Gyroscope and Accelerometer Calibration with Raspberry PiJan 3, 2021
Jan 3, 2021
Dec 29, 2020
Calibration of an Inertial Measurement Unit (IMU) with Raspberry Pi -Part I
Dec 29, 2020
Dec 29, 2020
Nov 22, 2020
Recording Stereo Audio on a Raspberry PiNov 22, 2020
Nov 22, 2020
Jun 10, 2020
High Resolution Thermal Camera with Raspberry Pi and MLX90640Jun 10, 2020
Jun 10, 2020
Back to Top
Featured
Quick View
Maker Portal Arduino Uno Rev3 Board13.00
Quick View
Raspberry Pi 4 Model B Computer55.00
Quick View
Raspberry Pi Pico Starter Kit15.00
Quick View
16-Pixel RGB LED Ring Light15.00
Featured
Mar 9, 2021
Raspberry Pi Pico OLED Display (SSD1306)Mar 9, 2021
Mar 9, 2021
Mar 1, 2021
WS2812 LED Ring Light with Raspberry Pi PicoMar 1, 2021
Mar 1, 2021
Feb 12, 2021
Listening to Your Pipes with a MEMS Microphone and Raspberry PiFeb 12, 2021
Feb 12, 2021
Feb 4, 2021
3 Intermediate-Level Arduino Projects to Try at HomeFeb 4, 2021
Feb 4, 2021
Arduino , Electronics, Data Analysis
, Programming
, Python Joshua
Hrisko June 29, 2019MAX30102, Arduino Finger ,
Arduino MAX30102 , Arduino Heart Rate , MAX30102 Heart Rate, Heart Rate ,
Pulse Oximeter , MAX30102 Pulse Oximeter, Oximetry ,
Python , Python Code , Python Serial , Python MAX30102, Arduino Python
, Arduino Serial ,
Arduino Pulse Oximetry , Python Pulse Oximetry , Python Analysis, Python Data ,
Python Data Analysis , Python Convolution , Python FFT, FFT , matplotlib
, Python matplotlinb, Python PPG ,
Most Popular 2019 10 CommentsFacebook0
LinkedIn0
Tumblr
Pinterest1
2 Likes
Previous
SATELLITE IMAGERY ANALYSIS IN PYTHON PART I: GOES-16 DATA, NETCDF FILES, AND THE BASEMAP TOOLKIT Data Analysis, Python, Programming, Engineering, GISJoshua HriskoJuly 10, 2019Python, Python Image, Python Latitude, Python Satellite, Python Algorithm, Python GOES-R Satellite, Python Earth, Python GIS, Python Basemap, Basemap Toolkit, Basemap, GIS, GIS Mapping, GIS in Python, Geographic Information System, GOES-16 Satellite, GOES-R Satellite, GOES-R Lat/Lon, GOES-R Data, GOES-R, GOES-R netCDF, GOES-R LST, LST, Land Surface Temperature, LST Data, Temperature, Satellite, Satellite Analysis, Python Data, Python Data Analysis, Image Processing, Python Image Processing, FTP, Python FTP1 CommentNext
DIY LASER POINTER CAT TOY ElectronicsJoshua HriskoJune 16, 2019Laser, DIY, Laser Diode, Diode, DIY Laser, DIY Laser Pointer, DIY Toy, DIY Electronics, Electronics, LiPo, Battery, nanometer, Nano, Push ButtonMaker Portal LLC
New York, NY 10025,
United States engineer@makersportal.comHours
Explore
------------------------- About Blog Shop ContactCollaborate
------------------------- Consulting Guest PostAdvertise
Connect
------------------------- Maker Portal LLC Copyright © 2021 | Affiliate Disclosure| Privacy Policy
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0