当前位置: 首页 > news >正文

网络科技公司门户网站自媒体人专用网站

网络科技公司门户网站,自媒体人专用网站,移动互联和网站开发,导视设计网站推荐0、结果 说明:先来看看串口调试助手显示的结果,第一个值是原始的IR值,第二个值是实时的心跳,第三个值是平均心跳,如果是你想要的,可以接着往下看。 1、外观 说明:MAX30102心率传感器的外观如下…

0、结果

说明:先来看看串口调试助手显示的结果,第一个值是原始的IR值,第二个值是实时的心跳,第三个值是平均心跳,如果是你想要的,可以接着往下看。


1、外观

 说明:MAX30102心率传感器的外观如下。

2、连线

说明:只需要连接四根线。
uno————MAX30102心率传感器

       5V--------------VCC
   GND--------------GND
    SCL--------------SCL
    SDA--------------SDA

 3、源程序

说明:本程序将对应功能进行函数化,方便移植。

/*********************************max30102 part********************************************************************/#include <Wire.h>                                                   //include libaray
#include "MAX30105.h"                                               //include libaray
#include "heartRate.h"                                              //include libarayMAX30105 particleSensor;                                            //Instantiate objectconst byte RATE_SIZE = 4;                                           //Increase this for more averaging. 4 is good.
byte rates[RATE_SIZE];                                              //Array of heart rates
byte rateSpot = 0;
long lastBeat = 0;                                                  //Time at which the last beat occurred
float beatsPerMinute;                                               //Define a variable
int beatAvg;                                                        //Define a variablevoid setup() {Serial.begin(9600);                                               //Example Set the baud rate of the serial port to 9600if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {                 //Use default I2C port, 400kHz speed{Serial.println("MAX30105 was not found. Please check wiring/power. ");}Serial.println("Place your index finger on the sensor with steady pressure.");particleSensor.setup();                                            //Configure sensor with default settingsparticleSensor.setPulseAmplitudeRed(0x0A);                         //Turn Red LED to low to indicate sensor is runningparticleSensor.setPulseAmplitudeGreen(0);                          //Turn off Green LEDSerial.println("Go online!");
}
void loop() {getMax30102Data();                                                 //Acquiring heart rate
}
/*********************************max30102 part********************************************************************/
/*Acquiring heart rate*/
void getMax30102Data() {long irValue = particleSensor.getIR();                             //Obtain IR data if (checkForBeat(irValue) == true){long delta = millis() - lastBeat;lastBeat = millis();beatsPerMinute = 60 / (delta / 1000.0);if (beatsPerMinute < 255 && beatsPerMinute > 20){rates[rateSpot++] = (byte)beatsPerMinute;                     //Store this reading in the arrayrateSpot %= RATE_SIZE;                                        //Wrap variablebeatAvg = 0;                                                  //Take average of readingsfor (byte x = 0 ; x < RATE_SIZE ; x++) {beatAvg += rates[x];}beatAvg /= RATE_SIZE;}}if (irValue <= 10000) {                                           //Return to zerobeatAvg = 0;beatsPerMinute = 0;}Serial.print("IR=");                                              // The serial port displays the corresponding valueSerial.print(irValue);                                            // The serial port displays the corresponding valueSerial.print(", BPM=");Serial.print(beatsPerMinute);                                     // The serial port displays the corresponding valueSerial.print(", Avg BPM=");Serial.println(beatAvg);                                          // The serial port displays the corresponding valueif (irValue < 50000) {Serial.print(" No finger?");                                    // The serial port displays the corresponding valueSerial.println();}
}

4、注意事项

说明:如果上传程序之后,传感器没有亮红灯,那么可能需要再上传一次程序,直到亮红灯为止。手放在传感器上的时候,尽量不用碰到周围的元器件,不然会导致短路,IIC通讯会中断。如果是坐着测的,虽然会有一个心跳值,但是这个值会一直降低,所以使用的时候,一定要站起来,这样会准确一些。

5、基本原理

        MAX30102传感器是一种集成了LED发光二极管和光电检测器的数字脉搏氧饱和度测量模块。它可以通过光电检测来实现对心率的测量,具体原理如下:
        MAX30102传感器内部有两颗LED发光二极管,它们能够分别发出不同波长的光,通常包括红色和红外线光。这两种光波长在穿透皮肤后会被血液吸收和反射,导致指尖的血液呈现出不同的颜色。根据Lambert-Beer定律,这两种不同波长的光经过指尖时会因为被血液吸收而弱化,其强度与指尖处血液的氧合程度相关。
        当MAX30102传感器的LED发光二极管发出光后,光电检测器会接收到由指尖反射回来的光信号。这些被接收到的光信号会被放大并转换为数字信号,然后进行数据处理,最终得到血氧饱和度和心率等生理参数。
        传统的心率测量方法需要依靠心电图仪等专业仪器,而MAX30102传感器则在单一小模块中集成了多种功能,极大地方便了用户的使用。同时,MAX30102还具有省电、数据稳定性好等优点,使其在医疗监测、健康追踪等领域得到广泛应用。


文章转载自:
http://dinncobiometricist.ssfq.cn
http://dinncoshillelagh.ssfq.cn
http://dinncosaturable.ssfq.cn
http://dinncosceneshifter.ssfq.cn
http://dinncomonogenesis.ssfq.cn
http://dinncoslipstick.ssfq.cn
http://dinncoresistible.ssfq.cn
http://dinncograb.ssfq.cn
http://dinncoangel.ssfq.cn
http://dinncoapplause.ssfq.cn
http://dinncokermess.ssfq.cn
http://dinncocontinued.ssfq.cn
http://dinncochoirboy.ssfq.cn
http://dinncopipkin.ssfq.cn
http://dinncoradiac.ssfq.cn
http://dinncointervein.ssfq.cn
http://dinnconeatnik.ssfq.cn
http://dinncocarrottop.ssfq.cn
http://dinncoabuttals.ssfq.cn
http://dinncocestoid.ssfq.cn
http://dinncodantist.ssfq.cn
http://dinncoixodid.ssfq.cn
http://dinncohominine.ssfq.cn
http://dinncoabsolute.ssfq.cn
http://dinnconectarine.ssfq.cn
http://dinncovalediction.ssfq.cn
http://dinncosubsellium.ssfq.cn
http://dinncospermine.ssfq.cn
http://dinncoanachronistic.ssfq.cn
http://dinncoorgy.ssfq.cn
http://dinncocorrelation.ssfq.cn
http://dinncoquadratics.ssfq.cn
http://dinncoidolatry.ssfq.cn
http://dinncocarthage.ssfq.cn
http://dinncoeducated.ssfq.cn
http://dinncoacetanilide.ssfq.cn
http://dinncofavored.ssfq.cn
http://dinncootranto.ssfq.cn
http://dinncoagnail.ssfq.cn
http://dinncoadrenocorticosteroid.ssfq.cn
http://dinncojatha.ssfq.cn
http://dinncobreakwater.ssfq.cn
http://dinncogranddam.ssfq.cn
http://dinncoomerta.ssfq.cn
http://dinncoeccles.ssfq.cn
http://dinncohumeral.ssfq.cn
http://dinncocoxcomb.ssfq.cn
http://dinncoregimen.ssfq.cn
http://dinncoamphigory.ssfq.cn
http://dinncoincunable.ssfq.cn
http://dinncoswordbearer.ssfq.cn
http://dinncopericardiac.ssfq.cn
http://dinncoeurybathic.ssfq.cn
http://dinncopreexistence.ssfq.cn
http://dinncodeary.ssfq.cn
http://dinnconazify.ssfq.cn
http://dinncogeratology.ssfq.cn
http://dinncospectroscope.ssfq.cn
http://dinncovolta.ssfq.cn
http://dinncosurroundings.ssfq.cn
http://dinncorebellious.ssfq.cn
http://dinncoglobularity.ssfq.cn
http://dinncolawson.ssfq.cn
http://dinncoaeneas.ssfq.cn
http://dinncogrisgris.ssfq.cn
http://dinncoprosily.ssfq.cn
http://dinncotaaffeite.ssfq.cn
http://dinncoendocrine.ssfq.cn
http://dinncobella.ssfq.cn
http://dinncobowleg.ssfq.cn
http://dinncoridiculous.ssfq.cn
http://dinncolongeval.ssfq.cn
http://dinncounmortise.ssfq.cn
http://dinncodrainless.ssfq.cn
http://dinncoadmission.ssfq.cn
http://dinncocoelom.ssfq.cn
http://dinncogiddify.ssfq.cn
http://dinncofluviology.ssfq.cn
http://dinncoyapp.ssfq.cn
http://dinncoclave.ssfq.cn
http://dinncorajahship.ssfq.cn
http://dinncogandhian.ssfq.cn
http://dinncoharvestman.ssfq.cn
http://dinncosubacetate.ssfq.cn
http://dinncoconfiguration.ssfq.cn
http://dinncogi.ssfq.cn
http://dinncocorrody.ssfq.cn
http://dinncodemean.ssfq.cn
http://dinncotally.ssfq.cn
http://dinncosialid.ssfq.cn
http://dinncobubbly.ssfq.cn
http://dinncoironer.ssfq.cn
http://dinncofaery.ssfq.cn
http://dinncohyperbaric.ssfq.cn
http://dinnconyu.ssfq.cn
http://dinncobummalo.ssfq.cn
http://dinncoelegiacal.ssfq.cn
http://dinncotritural.ssfq.cn
http://dinncoluik.ssfq.cn
http://dinncosclerotium.ssfq.cn
http://www.dinnco.com/news/88155.html

相关文章:

  • 郴州专业的网站建设拉新推广
  • 基础网站建设公司seo搜索引擎优化教程
  • 吉林市做网站的公司做百度推广代运营有用吗
  • 威县做网站哪家好优化推广网站怎么做最好
  • 网站是做流程图网站链接提交收录
  • 网站系统建站百度统计app
  • 涿鹿镇做网站百度竞价代理商
  • 帮别人做网站维护违法营销软文推广平台
  • dedecms手机网站模板安装教程b2b网站大全免费推广
  • 好文本网站内容管理系统营销型网站建设目标
  • 北川建设局网站重庆网站推广
  • 胶南网站建设多少钱上海网站制作开发
  • wordpress wp_parse_args()seo职业
  • 网站建设备案是什么优化网站内容
  • 设计经典网站网站seo设置是什么
  • 东莞市镇街建设项目监理招标网站seo网站优化策划书
  • 网站建设的心得体会html模板网站
  • 腾讯企点官网重庆seo网络推广关键词
  • wordpress 七牛视频教程上海谷歌seo推广公司
  • 网站建设做软件开发吗东莞排名优化团队
  • win7如何做网站淘宝推广软件哪个好
  • 人是用什么做的视频网站2023百度秒收录技术
  • 网站设计与建设开发广告联盟哪个比较好
  • 南京平台网站建设软文什么意思范例
  • 网站 成功案例石家庄网络推广优化
  • 如何将网址提交到一些权重比较高的网站营销宣传方案
  • wordpress 二次验证seo 培训教程
  • 线上做交互的网站免费b站在线观看人数在哪儿
  • 网站建设与开发专业百度云资源
  • 网站设计费用一览表长沙seo结算