LoginSignup
1
1

More than 5 years have passed since last update.

Heart Rate Sensor PulseSensor Analog Signal Output - 心拍の生データ取得

Last updated at Posted at 2018-10-12

心拍の生データ取得

PulseSensorPlayground を使わずにデータ習得してみた。これだね!!

かなり早いね。。。

取得結果

シンプルにアナログ入力の表示のみ

イリーガル値のみ排除してシリアル出力


int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor

void setup() {
  Serial.begin(38400);          // For Serial Monitor
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  if ( sensorValue > 400 && sensorValue < 600 ) {
    Serial.print( "600 500 400 ");                        // Print the value inside of myBPM.
    Serial.println(sensorValue);
  }
  delay(10);
}

ライブラリを使う場合は、ライブラリマネージャーから取得してください。

心拍数がほしい時は、こちらが便利

ライブラリマネージャー

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1