欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: 求教max30100在網上找的Arduino代碼不行 [打印本頁]

作者: 1039736184    時間: 2019-4-21 21:45
標題: 求教max30100在網上找的Arduino代碼不行
幫忙看下哪里有問題(在網上找的代碼),運行后燈不亮,串口只顯示Beat



#include <Wire.h>
#include "MAX30100_PulseOximeter.h"

#define REPORTING_PERIOD_MS     1000

// PulseOximeter is the higher level interface to the sensor
// it offers:
//  * beat detection reporting
//  * heart rate calculation
//  * SpO2 (oxidation level) calculation
PulseOximeter pox;

uint32_t tsLastReport = 0;

// Callback (registered below) fired when a pulse is detected
void onBeatDetected()
{
    Serial.println("Beat!");
}

void setup()
{
    Serial.begin(115200);

    // Initialize the PulseOximeter instance and register a beat-detected callback
    pox.begin();
    pox.setOnBeatDetectedCallback(onBeatDetected);
}

void loop()
{
    // Make sure to call update as fast as possible
    pox.update();

    // Asynchronously dump heart rate and oxidation levels to the serial
    // For both, a value of 0 means "invalid"
    if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
        Serial.print("Heart rate:");
        Serial.print(pox.getHeartRate());
        Serial.print("bpm / SpO2:");
        Serial.print(pox.getSpO2());
        Serial.println("%");

        tsLastReport = millis();
    }
}


作者: 陽明    時間: 2019-5-6 17:32
我用30102也遇到同樣問題

作者: 395164965    時間: 2020-7-15 09:14
請問你解決了嗎?我也碰到了同樣的問題
作者: 395164965    時間: 2020-7-15 09:15
請問你解決了嗎?我也碰到了這個問題
作者: wyqf    時間: 2020-10-20 19:20
解決了,參考這篇博文https://blog.csdn.net/JaLLs/article/details/99708019,包括需要下載的zip庫都有再評論區給你




歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1