Skip to content

Commit edebad6

Browse files
author
Nathan Seidle
committed
Fixing issue 4
1 parent 2596e5a commit edebad6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/Example8_SPO2/Example8_SPO2.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ MAX30105 particleSensor;
3434

3535
#define MAX_BRIGHTNESS 255
3636

37-
#if defined(ARDUINO_AVR_UNO)
37+
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
3838
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
3939
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
4040
uint16_t irBuffer[100]; //infrared LED sensor data

src/spo2_algorithm.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#include "arduino.h"
6161
#include "spo2_algorithm.h"
6262

63-
#if defined(ARDUINO_AVR_UNO)
63+
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
6464
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
6565
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
6666
void maxim_heart_rate_and_oxygen_saturation(uint16_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint16_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid,

src/spo2_algorithm.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int32_t an_x[ BUFFER_SIZE]; //ir
8484
static int32_t an_y[ BUFFER_SIZE]; //red
8585

8686

87-
#if defined(ARDUINO_AVR_UNO)
87+
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
8888
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
8989
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
9090
void maxim_heart_rate_and_oxygen_saturation(uint16_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint16_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid, int32_t *pn_heart_rate, int8_t *pch_hr_valid);

0 commit comments

Comments
 (0)