Created
May 26, 2018 13:36
-
-
Save TakehikoShimojima/cfb2da1e2575a23ca1629d6f4ce3a16d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <M5Stack.h> | |
#define HR_pin 36 // 心拍センサーの信号線をGPIO36につなぐ | |
void setup(){ | |
M5.begin(); | |
dacWrite(25, 0); // Speaker OFF | |
Serial.println("Pulse sensor test"); | |
pinMode(HR_pin, INPUT); | |
} | |
void loop() { | |
Serial.println(analogRead(HR_pin)); // 心拍センサーを読み、シリアルに出力 | |
delay(10); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment