Walet
Walet
Walet
h>
#include "MAX30100_PulseOximeter.h"
// it offers:
PulseOximeter pox;
uint32_t tsLastReport2 = 0;
uint32_t tsLastReport3 = 0;
uint32_t tsLastReport4 = 0;
void onBeatDetected()
Serial.println("Beat!");
#include <SoftwareSerial.h>
int bluetoothTx = 2;
int bluetoothRx = 3;
char cmd[100];
int cmdIndex;
int Saklar=0;
int hitungan1=0;
int a=0;
int bpm;
return false;
void exeCmd()
void setup()
Serial.begin(9600);
cmdIndex = 0;
bluetooth.print("$");
bluetooth.print("$");
delay(250);
bluetooth.begin(9600);
cmdIndex = 0;
Serial.println("Initializing MAX30100");
pox.begin();
pox.setOnBeatDetectedCallback(onBeatDetected);
// Initialize the PulseOximeter instance
// Failures are generally due to an improper I2C wiring, missing power supply
// The default current for the IR LED is 50mA and it could be changed
// available options.
// pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
void loop()
pox.update();
while(bluetooth.available()) {
char c = (char)bluetooth.read();
if(c=='\n')
cmd[cmdIndex] = 0;
else
cmd[cmdIndex] = c;
if(cmdIndex<99) cmdIndex++;
}
// Asynchronously dump heart rate and oxidation levels to the serial
bluetooth.print
bluetooth.print
//Pembacaan sensor