Vlad_the_destroyer
Published © GPL3+

MAX30100 And Blynk

An I2C interface with Blynk.

BeginnerShowcase (no instructions)3 hours9,494
MAX30100 And Blynk

Things used in this project

Story

Read more

Schematics

Normal interface

Nothing special as I am using simple stream

Code

MAX30100raw and blynk

Arduino
I got intutive.
#include <Wire.h>
#include <MAX30100_PulseOximeter.h>
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(10, 11); //RX, TX
#define BLYNK_SERIAL DebugSerial
#include <BlynkSimpleStream.h>

//Auth
char auth[] = "66c8a1cf6ab64769889e1daf37aefb82";

//widget virtual pin goes here
WidgetLCD lcd(V5);

//default waiting period 
#define REPORTING_PERIOD_MS     1000

//Instantiate pulser oximeter
PulseOximeter pox;

uint32_t tsLastReport = 0;


void setup()
{
  DebugSerial.begin(19200);
  Serial.begin(9600);
  Blynk.begin(Serial,auth); //Session begins here
  pox.begin();
}


void loop()
{
  Blynk.run();
  pox.update();
  //lcd.clear();
  //lcd.print(0,0 ,"Heart Rate:");
  //timer.run();

  //Asyn data push
  if (millis() - tsLastReport > REPORTING_PERIOD_MS)
  {
    lcd.print(0, 0, "Heart Rate:");
    lcd.print(0,1 ,pox.getHeartRate());
    tsLastReport = millis();
  }
}

Credits

Vlad_the_destroyer

Vlad_the_destroyer

1 project • 3 followers
HEHE.....

Comments