2

I am looking to save pulse and SPO2 readings from the cooking hacks e-health sensor platform (link below) onto my Arduino Uno's EEPROM then remove the health shield and use an Ethernet shield to move the data. A piece of my code is as below:

#include <PinChangeInt.h>
#include <eHealth.h>
#include <EEPROM.h>

int cont =0;
int addr =0;
int BPM;
int SPO2;

void loop() {

Serial.print("PRbpm:");
Serial.print(e.health.getBPM);
BPM =eHealth.getBPM();

Serial.print("%SPo2 :);
Serial.print(eHealth.getOxygenSaturation());
SPO2 =eHealth.getOxygenSaturation();

Serial.print("\n");
Serial.println("===========");
EEPROM.write(0,eHealth.getBPM());
delay(500);
}

The two readings I am trying to save and then load onto another sketch are BPM and SPO2, does the line:

EEPROM.write(0,eHealth.getBPM());

make sense and how would I also save and send the second reading SPO2? Any help appreciated or any knowledge of why my idea will not work also appreciated, thanks. Cooking-hacks sensor platform

topping25
  • 31
  • 1

1 Answers1

0
EEPROM.write(0,BPM);
EEPROM.write(1,SPO2);
Zoe
  • 27,060
  • 21
  • 118
  • 148
  • 3
    While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. – cursorrux Sep 17 '21 at 12:34