Skip to content

Commit 8953746

Browse files
author
Elias Santistevan
committed
Changes constructor to remove the only available address as its argument, instead assigns it by default
1 parent e9c381c commit 8953746

File tree

7 files changed

+6
-38
lines changed

7 files changed

+6
-38
lines changed

Examples/Example1_config_BPM_Mode1/Example1_config_BPM_Mode1.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@
2727
#include <SparkFun_Bio_Sensor_Hub_Library.h>
2828
#include <Wire.h>
2929

30-
// No other Address options.
31-
#define DEF_ADDR 0x55
32-
3330
// Reset pin, MFIO pin
3431
const int resPin = 4;
3532
const int mfioPin = 5;
3633

3734
// Takes address, reset pin, and MFIO pin.
38-
SparkFun_Bio_Sensor_Hub bioHub(DEF_ADDR, resPin, mfioPin);
35+
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin);
3936

4037
bioData body;
4138
// ^^^^^^^^^

Examples/Example2_config_BPM_Mode2/Example2_config_BPM_Mode2.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@
2929
#include <SparkFun_Bio_Sensor_Hub_Library.h>
3030
#include <Wire.h>
3131

32-
// No other Address options.
33-
#define DEF_ADDR 0x55
34-
3532
// Reset pin, MFIO pin
3633
const int resPin = 4;
3734
const int mfioPin = 5;
3835

3936
// Takes address, reset pin, and MFIO pin.
40-
SparkFun_Bio_Sensor_Hub bioHub(DEF_ADDR, resPin, mfioPin);
37+
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin);
4138

4239
bioData body;
4340
// ^^^^^^^^^

Examples/Example3_modify_AGC_Algo/Example3_modify_AGC_Algo.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
#include <SparkFun_Bio_Sensor_Hub_Library.h>
2828
#include <Wire.h>
2929

30-
// No other Address options.
31-
#define DEF_ADDR 0x55
32-
3330
// Reset pin, MFIO pin
3431
const int resPin = 4;
3532
const int mfioPin = 5;
@@ -40,7 +37,7 @@ int algoSens = 20; // Sensitivity (0-100%)
4037
int algoSamp = 10; // Number of samples to average (0-255)
4138

4239
// Takes address, reset pin, and MFIO pin.
43-
SparkFun_Bio_Sensor_Hub bioHub(DEF_ADDR, resPin, mfioPin);
40+
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin);
4441

4542
sensorAttr attributes;
4643
bioData body;

Examples/Example4_config_LEDs_BPM/Example4_config_LEDs_BPM.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
#include <SparkFun_Bio_Sensor_Hub_Library.h>
3131
#include <Wire.h>
3232

33-
// No other Address options.
34-
#define DEF_ADDR 0x55
35-
3633
// Reset pin, MFIO pin
3734
const int resPin = 4;
3835
const int mfioPin = 5;
@@ -47,7 +44,7 @@ int pulseWidthVal;
4744
int sampleVal;
4845

4946
// Takes address, reset pin, and MFIO pin.
50-
SparkFun_Bio_Sensor_Hub bioHub(DEF_ADDR, resPin, mfioPin);
47+
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin);
5148

5249
bioData body;
5350
// ^^^^^^^^^

src/SparkFun_Bio_Sensor_Hub_Library.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ kk
2020

2121
#include "SparkFun_Bio_Sensor_Hub_Library.h"
2222

23-
SparkFun_Bio_Sensor_Hub::SparkFun_Bio_Sensor_Hub(uint8_t address, uint8_t resetPin, uint8_t mfioPin ) {
23+
SparkFun_Bio_Sensor_Hub::SparkFun_Bio_Sensor_Hub(uint8_t resetPin, uint8_t mfioPin, uint8_t address = 0x55 ) {
2424

2525
_resetPin = resetPin;
2626
_mfioPin = mfioPin;

src/SparkFun_Bio_Sensor_Hub_Library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class SparkFun_Bio_Sensor_Hub
301301
uint8_t bpmSenArrTwo[MAXFAST_ARRAY_SIZE + MAXFAST_EXTENDED_DATA + MAX30101_LED_ARRAY];
302302

303303
// Constructor ----------
304-
SparkFun_Bio_Sensor_Hub(uint8_t address, uint8_t resetPin, uint8_t mfioPin );
304+
SparkFun_Bio_Sensor_Hub(uint8_t, uint8_t, uint8_t address = 0x55);
305305

306306
// Functions ------------
307307

src/notes.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)