Skip to content

Commit 86cd395

Browse files
committed
Modifying Ex8 to work with SAMD21
1 parent 4e673a4 commit 86cd395

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/Example8_SPO2/Example8_SPO2.ino

+5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ MAX30105 particleSensor;
3434

3535
#define MAX_BRIGHTNESS 255
3636

37+
#if defined(ARDUINO_AVR_UNO)
3738
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
3839
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
3940
uint16_t irBuffer[100]; //infrared LED sensor data
4041
uint16_t redBuffer[100]; //red LED sensor data
42+
#else
43+
uint32_t irBuffer[100]; //infrared LED sensor data
44+
uint32_t redBuffer[100]; //red LED sensor data
45+
#endif
4146

4247
int32_t bufferLength; //data length
4348
int32_t spo2; //SPO2 value

0 commit comments

Comments
 (0)