MAX30102 Library 1.0.0
This is a library for the MAX30102
Loading...
Searching...
No Matches
SparkFun_Bio_Sensor_Hub_Library.h
Go to the documentation of this file.
1#ifndef _SPARKFUN_BIO_SENSOR_HUB_LIBRARY_H_
2#define _SPARKFUN_BIO_SENSOR_HUB_LIBRARY_H_
3
4#include <Wire.h>
5#include <Arduino.h>
6
7
8#define WRITE_FIFO_INPUT_BYTE 0x04
9#define DISABLE 0x00
10#define ENABLE 0x01
11#define MODE_ONE 0x01
12#define MODE_TWO 0x02
13#define APP_MODE 0x00
14#define BOOTLOADER_MODE 0x08
15#define NO_WRITE 0x00
16#define INCORR_PARAM 0xEE
17
18#define CONFIGURATION_REGISTER 0x0A
19#define PULSE_MASK 0xFC
20#define READ_PULSE_MASK 0x03
21#define SAMP_MASK 0xE3
22#define READ_SAMP_MASK 0x1C
23#define ADC_MASK 0x9F
24#define READ_ADC_MASK 0x60
25
26#define ENABLE_CMD_DELAY 45 // Milliseconds
27#define CMD_DELAY 6 // Milliseconds
28#define MAXFAST_ARRAY_SIZE 6 // Number of bytes....
29#define MAXFAST_EXTENDED_DATA 5
30#define MAX30101_LED_ARRAY 12 // 4 values of 24 bit (3 byte) LED values
31
32#define SET_FORMAT 0x00
33#define READ_FORMAT 0x01 // Index Byte under Family Byte: READ_OUTPUT_MODE (0x11)
34#define WRITE_SET_THRESHOLD 0x01 //Index Byte for WRITE_INPUT(0x14)
35#define WRITE_EXTERNAL_TO_FIFO 0x00
36
37const uint8_t BIO_ADDRESS = 0x55;
38
39struct bioData {
40
41 uint32_t irLed;
42 uint32_t redLed;
43 uint16_t heartRate; // LSB = 0.1bpm
44 uint8_t confidence; // 0-100% LSB = 1%
45 uint16_t oxygen; // 0-100% LSB = 1%
46 uint8_t status; // 0: Success, 1: Not Ready, 2: Object Detectected, 3: Finger Detected
47 float rValue; // -- Algorithm Mode 2 vv
48 int8_t extStatus; // --
49 uint8_t reserveOne; // --
50 uint8_t resserveTwo; // -- Algorithm Mode 2 ^^
51
52};
53
54struct version {
55 // 3 bytes total
56 uint8_t major;
57 uint8_t minor;
58 uint8_t revision;
59
60};
61
62struct sensorAttr {
63
64 uint8_t byteWord;
66
67};
68
69// Status Bytes are communicated back after every I-squared-C transmission and
70// are indicators of success or failure of the previous transmission.
72
73 SUCCESS = 0x00,
83 ERR_UNKNOWN = 0xFF
84
85};
86
87// The family register bytes are the larger umbrella for all the Index and
88// Write Bytes listed below. You can not reference a nestled byte without first
89// referencing it's larger category: Family Register Byte.
91
92 HUB_STATUS = 0x00,
95 OUTPUT_MODE = 0x10,
111 IDENTITY = 0xFF
112
114
115// All the defines below are: 1. Index Bytes nestled in the larger category of the
116// family registry bytes listed above and 2. The Write Bytes nestled even
117// farther under their Index Bytes.
118
119// Write Bytes under Family Byte: SET_DEVICE_MODE (0x01) and Index
120// Byte: 0x00.
122
124 RESET = 0x02,
125 ENTER_BOOTLOADER = 0x08
126
128
129// Write Bytes under Family Byte: OUTPUT_MODE (0x10) and Index byte: SET_FORMAT
130// (0x00)
132
133 PAUSE = 0x00,
141
143
144// Index Byte under the Family Byte: READ_DATA_OUTPUT (0x12)
146
149
151
152// Index Byte under the Family Byte: READ_DATA_INPUT (0x13)
154
157 READ_SENSOR_DATA, // For external accelerometer
158 READ_NUM_SAMPLES_INPUT, // For external accelerometer
160
162
163// Index Byte under the Family Registry Byte: WRITE_REGISTER (0x40)
165
168
170
171// Index Byte under the Family Registry Byte: READ_REGISTER (0x41)
173
176
178
179// Index Byte under the Family Registry Byte: READ_ATTRIBUTES_AFE (0x42)
181
184
186
187// Index Byte under the Family Byte: DUMP_REGISTERS (0x43)
189
192
194
195// Index Byte under the Family Byte: ENABLE_SENSOR (0x44)
197
200
202
203// Index Byte for the Family Byte: READ_SENSOR_MODE (0x45)
205
208
210
211// Index Byte under the Family Byte: CHANGE_ALGORITHM_CONFIG (0x50)
213
219
220};
221
222// Write Bytes under the Family Byte: CHANGE_ALGORITHM_CONFIG (0x50) and the
223// Index Byte: ALGORITHM_CONFIG_INDEX_BYTE - SET_TARG_PERC
225
226 AGC_GAIN_ID = 0x00,
230 MAXIMFAST_COEF_ID = 0x0B
231
233
234// Index Bytes under the Family Byte: READ_ALGORITHM_CONFIG (0x51)
236
241 READ_MAX_FAST_COEF = 0x02
242
244
245// Write Bytes under the Family Byte: READ_ALGORITHM_CONFIG (0x51) and Index Byte:
246// READ_ALGORITHM_INDEX_BYTE - AGC
248
254
256
257// Index Byte under the Family Byte: ENABLE_ALGORITHM (0x52).
259
261 ENABLE_WHRM_ALGO = 0x02
262
264
265// Index Byte under the Family Byte: BOOTLOADER_FLASH (0x80).
267
273
275
276// Index Byte under the Family Byte: BOOTLOADER_INFO (0x81).
278
281
283
284// Index Byte under the Family Byte: IDENTITY (0xFF).
286
289 READ_ALGO_VERS = 0x07
290
292
294{
295 public:
296
297 // Variables ------------
298 uint8_t bpmArr[MAXFAST_ARRAY_SIZE];
299 uint8_t bpmArrTwo[MAXFAST_ARRAY_SIZE + MAXFAST_EXTENDED_DATA];
300 uint8_t senArr[MAX30101_LED_ARRAY];
301 uint8_t bpmSenArr[MAXFAST_ARRAY_SIZE + MAX30101_LED_ARRAY];
302 uint8_t bpmSenArrTwo[MAXFAST_ARRAY_SIZE + MAXFAST_EXTENDED_DATA + MAX30101_LED_ARRAY];
303
304 // Constructor ----------
305 SparkFun_Bio_Sensor_Hub(uint16_t, uint16_t, uint8_t address = 0x55);
306
307 // Functions ------------
308
309 // Family Byte: READ_DEVICE_MODE (0x02) Index Byte: 0x00, Write Byte: 0x00
310 // The following function initializes the sensor. To place the MAX32664 into
311 // application mode, the MFIO pin must be pulled HIGH while the board is held
312 // in reset for 10ms. After 50 addtional ms have elapsed the board should be
313 // in application mode and will return two bytes, the first 0x00 is a
314 // successful communcation byte, followed by 0x00 which is the byte indicating
315 // which mode the IC is in.
316 uint8_t begin( TwoWire &wirePort = Wire);
317
318 // Family Byte: READ_DEVICE_MODE (0x02) Index Byte: 0x00, Write Byte: 0x00
319 // The following function puts the MAX32664 into bootloader mode. To place the MAX32664 into
320 // bootloader mode, the MFIO pin must be pulled LOW while the board is held
321 // in reset for 10ms. After 50 addtional ms have elapsed the board should be
322 // in bootloader mode and will return two bytes, the first 0x00 is a
323 // successful communcation byte, followed by 0x08 which is the byte indicating
324 // that the board is in bootloader mode.
325 uint8_t beginBootloader( TwoWire &wirePort = Wire);
326
327 // Family Byte: HUB_STATUS (0x00), Index Byte: 0x00, No Write Byte.
328 // The following function checks the status of the FIFO.
329 uint8_t readSensorHubStatus();
330
331 // Family Byte: SET_DEVICE_MODE (0x01), Index Byte: 0x01, Write Byte: 0x00
332 // The following function is an alternate way to set the mode of the of
333 // MAX32664. It can take three parameters: Enter and Exit Bootloader Mode, as
334 // well as reset.
335 // INCOMPLETE
336 uint8_t setOperatingMode(uint8_t);
337
338 // This function sets very basic settings to get sensor and biometric data.
339 // The biometric data includes data about heartrate, the confidence
340 // level, SpO2 levels, and whether the sensor has detected a finger or not.
341 uint8_t configBpm(uint8_t);
342
343 // This function sets very basic settings to get LED count values from the MAX30101.
344 // Sensor data includes 24 bit LED values for the three LED channels: Red, IR,
345 // and Green.
346 uint8_t configSensor();
347
348 // This function sets very basic settings to get sensor and biometric data.
349 // Sensor data includes 24 bit LED values for the two LED channels: Red and IR.
350 // The biometric data includes data about heartrate, the confidence
351 // level, SpO2 levels, and whether the sensor has detected a finger or not.
352 // Of note, the number of samples is set to one.
353 uint8_t configSensorBpm(uint8_t);
354
355 // This function takes the 8 bytes from the FIFO buffer related to the wrist
356 // heart rate algortihm: heart rate (uint16_t), confidence (uint8_t) , SpO2 (uint16_t),
357 // and the finger detected status (uint8_t). Note that the the algorithm is stated as
358 // "wrist" though the sensor only works with the finger. The data is loaded
359 // into the whrmFifo and returned.
361
362 // This function takes 9 bytes of LED values from the MAX30101 associated with
363 // the RED, IR, and GREEN LEDs. In addition it gets the 8 bytes from the FIFO buffer
364 // related to the wrist heart rate algortihm: heart rate (uint16_t), confidence (uint8_t),
365 // SpO2 (uint16_t), and the finger detected status (uint8_t). Note that the the algorithm
366 // is stated as "wrist" though the sensor only works with the finger. The data is loaded
367 // into the whrmFifo and returned.
369
370 // This function takes the information of both the LED value and the biometric
371 // data from the MAX32664's FIFO. In essence it combines the two functions
372 // above into a single function call.
374
375 // This function modifies the pulse width of the MAX30101 LEDs. All of the LEDs
376 // are modified to the same width. This will affect the number of samples that
377 // can be collected and will also affect the ADC resolution.
378 // Width(us) - Resolution - Sample Rate
379 // Default: 69us - 15 resolution - 50 samples per second.
380 // 69us - 15 - <= 3200 (fastest - least resolution)
381 // 118us - 16 - <= 1600
382 // 215us - 17 - <= 1600
383 // 411us - 18 - <= 1000 (slowest - highest resolution)
384 uint8_t setPulseWidth(uint16_t);
385
386 // This function reads the CONFIGURATION_REGISTER (0x0A), bits [1:0] from the
387 // MAX30101 Sensor. It returns one of the four settings in microseconds.
388 uint16_t readPulseWidth();
389
390 // This function changes the sample rate of the MAX30101 sensor. The sample
391 // rate is affected by the set pulse width of the MAX30101 LEDs.
392 // Default: 69us - 15 resolution - 50 samples per second.
393 // Width(us) - Resolution - Sample Rate
394 // 69us - 15 - <= 3200 (fastest - least resolution)
395 // 118us - 16 - <= 1600
396 // 215us - 17 - <= 1600
397 // 411us - 18 - <= 1000 (slowest - highest resolution)
398 // Samples Options:
399 // 50, 100, 200, 400, 800, 1000, 1600, 3200
400 uint8_t setSampleRate(uint16_t);
401
402 // This function reads the CONFIGURATION_REGISTER (0x0A), bits [4:2] from the
403 // MAX30101 Sensor. It returns one of the 8 possible sample rates.
404 uint16_t readSampleRate();
405
406 // MAX30101 Register: CONFIGURATION_REGISTER (0x0A), bits [6:5]
407 // This functions sets the dynamic range of the MAX30101's ADC. The function
408 // accepts the higher range as a parameter.
409 // Default Range: 7.81pA - 2048nA
410 // Possible Ranges:
411 // 7.81pA - 2048nA
412 // 15.63pA - 4096nA
413 // 32.25pA - 8192nA
414 // 62.5pA - 16384nA
415 uint8_t setAdcRange(uint16_t);
416
417 // MAX30101 Register: CONFIGURATION_REGISTER (0x0A), bits [6:5]
418 // This function returns the set ADC range of the MAX30101 sensor.
419 uint16_t readAdcRange();
420
421 // Family Byte: IDENTITY (0x01), Index Byte: READ_MCU_TYPE, Write Byte: NONE
422 // The following function returns a byte that signifies the microcontoller that
423 // is in communcation with your host microcontroller. Returns 0x00 for the
424 // MAX32625 and 0x01 for the MAX32660/MAX32664.
425 uint8_t getMcuType();
426
427 // Family Byte: BOOTLOADER_INFO (0x80), Index Byte: BOOTLOADER_VERS (0x00)
428 // This function checks the version number of the bootloader on the chip and
429 // returns a four bytes: Major version Byte, Minor version Byte, Space Byte,
430 // and the Revision Byte.
431 int32_t getBootloaderInf();
432
433 // Family Byte: ENABLE_SENSOR (0x44), Index Byte: ENABLE_MAX30101 (0x03), Write
434 // Byte: senSwitch (parameter - 0x00 or 0x01).
435 // This function enables the MAX30101.
436 uint8_t max30101Control(uint8_t);
437
438 // Family Byte: READ_SENSOR_MODE (0x45), Index Byte: READ_ENABLE_MAX30101 (0x03)
439 // This function checks if the MAX30101 is enabled or not.
440 uint8_t readMAX30101State();
441
442 // Family Byte: ENABLE_SENSOR (0x44), Index Byte: ENABLE_ACCELEROMETER (0x04), Write
443 // Byte: accelSwitch (parameter - 0x00 or 0x01).
444 // This function enables the ACCELEROMETER.
445 uint8_t accelControl(uint8_t);
446
447 // Family Byte: OUTPUT_MODE (0x10), Index Byte: SET_FORMAT (0x00),
448 // Write Byte : outputType (Parameter values in OUTPUT_MODE_WRITE_BYTE)
449 uint8_t setOutputMode(uint8_t);
450
451 // Family Byte: OUTPUT_MODE, Index Byte: WRITE_SET_THRESHOLD, Write byte: intThres
452 // (parameter - value betwen 0 and 0xFF).
453 // This function changes the threshold for the FIFO interrupt bit/pin. The
454 // interrupt pin is the MFIO pin which is set to INPUT after IC initialization
455 // (begin).
456 uint8_t setFifoThreshold(uint8_t);
457
458 // Family Byte: READ_DATA_OUTPUT (0x12), Index Byte: NUM_SAMPLES (0x00), Write
459 // Byte: NONE
460 // This function returns the number of samples available in the FIFO.
461 uint8_t numSamplesOutFifo();
462
463 // Family Byte: READ_DATA_OUTPUT (0x12), Index Byte: READ_DATA (0x00), Write
464 // Byte: NONE
465 // This function returns the data in the FIFO.
466 uint8_t* getDataOutFifo(uint8_t data[]);
467
468 // Family Byte: READ_DATA_OUTPUT (0x12), Index Byte: READ_DATA (0x00), Write
469 // Byte: NONE
470 // This function adds support for the acceleromter that is NOT included on
471 // SparkFun's product, The Family Registery of 0x13 and 0x14 is skipped for now.
472 uint8_t numSamplesExternalSensor();
473
474 // Family Byte: WRITE_REGISTER (0x40), Index Byte: WRITE_MAX30101 (0x03), Write Bytes:
475 // Register Address and Register Value
476 // This function writes the given register value at the given register address
477 // for the MAX30101 sensor and returns a boolean indicating a successful or
478 // non-successful write.
479 void writeRegisterMAX30101(uint8_t, uint8_t);
480
481 // Family Byte: WRITE_REGISTER (0x40), Index Byte: WRITE_ACCELEROMETER (0x04), Write Bytes:
482 // Register Address and Register Value
483 // This function writes the given register value at the given register address
484 // for the Accelerometer and returns a boolean indicating a successful or
485 // non-successful write.
486 void writeRegisterAccel(uint8_t, uint8_t );
487
488 // Family Byte: READ_REGISTER (0x41), Index Byte: READ_MAX30101 (0x03), Write Byte:
489 // Register Address
490 // This function reads the given register address for the MAX30101 Sensor and
491 // returns the values at that register.
492 uint8_t readRegisterMAX30101(uint8_t);
493
494 // Family Byte: READ_REGISTER (0x41), Index Byte: READ_MAX30101 (0x03), Write Byte:
495 // Register Address
496 // This function reads the given register address for the MAX30101 Sensor and
497 // returns the values at that register.
498 uint8_t readRegisterAccel(uint8_t);
499
500 // Family Byte: READ_ATTRIBUTES_AFE (0x42), Index Byte: RETRIEVE_AFE_MAX30101/ (0x03)
501 // This function retrieves the attributes of the AFE (Analog Front End) of the
502 // MAX30101 sensor. It returns the number of bytes in a word for the sensor
503 // and the number of registers available.
505
506 // Family Byte: READ_ATTRIBUTES_AFE (0x42), Index Byte:
507 // RETRIEVE_AFE_ACCELEROMETER (0x04)
508 // This function retrieves the attributes of the AFE (Analog Front End) of the
509 // Accelerometer. It returns the number of bytes in a word for the sensor
510 // and the number of registers available.
512
513 // Family Byte: DUMP_REGISTERS (0x43), Index Byte: DUMP_REGISTER_MAX30101 (0x03)
514 // This function returns all registers and register values sequentially of the
515 // MAX30101 sensor: register zero and register value zero to register n and
516 // register value n.
517 uint8_t* dumpRegisterMAX30101(uint8_t, uint8_t regArray[255]);
518
519 // Family Byte: DUMP_REGISTERS (0x43), Index Byte: DUMP_REGISTER_ACCELEROMETER (0x04)
520 // This function returns all registers and register values sequentially of the
521 // Accelerometer: register zero and register value zero to register n and
522 // register value n.
523 uint8_t* dumpRegisterAccelerometer(uint8_t, uint8_t regArray[]);
524
525 // Family Byte: CHANGE_ALGORITHM_CONFIG (0x50), Index Byte:
526 // SET_TARG_PERC (0x00), Write Byte: AGC_GAIN_ID (0x00)
527 // This function sets the target percentage of the full-scale ADC range that
528 // the automatic gain control algorithm uses. It takes a paramater of zero to
529 // 100 percent.
530 uint8_t setAlgoRange(uint8_t);
531
532 // Family Byte: CHANGE_ALGORITHM_CONFIG (0x50), Index Byte:
533 // SET_STEP_SIZE (0x00), Write Byte: AGC_STEP_SIZE_ID (0x01)
534 // This function changes the step size toward the target for the AGC algorithm.
535 // It takes a paramater of zero to 100 percent.
536 uint8_t setAlgoStepSize(uint8_t);
537
538 // Family Byte: CHANGE_ALGORITHM_CONFIG (0x50), Index Byte:
539 // SET_SENSITIVITY (0x00), Write Byte: AGC_SENSITIVITY_ID (0x02)
540 // This function changes the sensitivity of the AGC algorithm.
541 uint8_t setAlgoSensitivity(uint8_t);
542
543 // Family Byte: CHANGE_ALGORITHM_CONFIG (0x50), Index Byte:
544 // SET_AVG_SAMPLES (0x00), Write Byte: AGC_NUM_SAMP_ID (0x03)
545 // This function changes the number of samples that are averaged.
546 // It takes a paramater of zero to 255.
547 uint8_t setAlgoSamples(uint8_t);
548
549 // Family Byte: CHANGE_ALGORITHM_CONFIG (0x50), Index Byte:
550 // SET_PULSE_OX_COEF (0x02), Write Byte: MAXIMFAST_COEF_ID (0x0B)
551 // This function takes three values that are used as the Sp02 coefficients.
552 uint8_t setMaximFastCoef(int32_t, int32_t, int32_t);
553
554 // Family Byte: READ_ALGORITHM_CONFIG (0x51), Index Byte:
555 // READ_AGC_PERCENTAGE (0x00), Write Byte: READ_AGC_PERC_ID (0x00)
556 // This function reads and returns the currently set target percentage
557 // of the full-scale ADC range that the Automatic Gain Control algorithm is using.
558 uint8_t readAlgoRange();
559
560 // Family Byte: READ_ALGORITHM_CONFIG (0x51), Index Byte:
561 // READ_AGC_STEP_SIZE (0x00), Write Byte: READ_AGC_STEP_SIZE_ID (0x01)
562 // This function returns the step size toward the target for the AGC algorithm.
563 // It returns a value between zero and 100 percent.
564 uint8_t readAlgoStepSize();
565
566 // Family Byte: READ_ALGORITHM_CONFIG (0x51), Index Byte:
567 // READ_AGC_SENSITIVITY_ID (0x00), Write Byte: READ_AGC_SENSITIVITY_ID (0x02)
568 // This function returns the sensitivity (percentage) of the automatic gain control.
569 uint8_t readAlgoSensitivity();
570
571 // Family Byte: READ_ALGORITHM_CONFIG (0x51), Index Byte:
572 // READ_AGC_NUM_SAMPLES (0x00), Write Byte: READ_AGC_NUM_SAMPlES_ID (0x03)
573 // This function changes the number of samples that are averaged.
574 // It takes a paramater of zero to 255.
575 uint8_t readAlgoSamples();
576
577 // Family Byte: READ_ALGORITHM_CONFIG (0x51), Index Byte:
578 // READ_MAX_FAST_COEF (0x02), Write Byte: READ_MAX_FAST_COEF_ID (0x0B)
579 // This function reads the maximum age for the wrist heart rate monitor
580 // (WHRM) algorithm. It returns three uint32_t integers that are
581 // multiplied by 100,000.
582 // INCOMPLETE
583 int32_t* readMaximFastCoef(int32_t coefArr[3]);
584
585 // Family Byte: ENABLE_ALGORITHM (0x52), Index Byte:
586 // ENABLE_AGC_ALGO (0x00)
587 // This function enables (one) or disables (zero) the automatic gain control algorithm.
588 uint8_t agcAlgoControl(uint8_t);
589
590 // Family Byte: ENABLE_ALGORITHM (0x52), Index Byte:
591 // ENABLE_WHRM_ALGO (0x02)
592 // This function enables (one) or disables (zero) the wrist heart rate monitor
593 // algorithm.
594 uint8_t maximFastAlgoControl(uint8_t);
595
596 // Family Byte: BOOTLOADER_FLASH (0x80), Index Byte: SET_NUM_PAGES (0x02),
597 // Write Bytes: 0x00 - Number of pages at byte 0x44 from .msbl file.
598 bool setNumPages(uint8_t);
599
600 // Family Byte: BOOTLOADER_FLASH (0x80), Index Byte: ERASE_FLASH (0x03)
601 // Returns true on successful communication.
602 bool eraseFlash();
603
604 // Family Byte: BOOTLOADER_INFO (0x81), Index Byte: BOOTLOADER_VERS (0x00)
606
607 // Family Byte: BOOTLOADER_INFO (0x81), Index Byte: PAGE_SIZE (0x01)
608 // Family Byte: IDENTITY (0xFF), Index Byte: READ_SENSOR_HUB_VERS (0x03)
610
611 // Family Byte: IDENTITY (0xFF), Index Byte: READ_ALGO_VERS (0x07)
613
614 private:
615
616 // Variables -----------
617 uint8_t _resetPin;
618 uint8_t _mfioPin;
619 uint8_t _address;
620 uint32_t _writeCoefArr[3];
622 uint8_t _sampleRate = 100;
623
624 // I-squared-C Class----
625 TwoWire *_i2cPort;
626
627 // Functions------------
628
629 // This function uses the given family, index, and write byte to enable
630 // the given sensor.
631 uint8_t enableWrite(uint8_t, uint8_t, uint8_t);
632
633 // This function uses the given family, index, and write byte to communicate
634 // with the MAX32664 which in turn communicates with downward sensors. There
635 // are two steps demonstrated in this function. First a write to the MCU
636 // indicating what you want to do, a delay, and then a read to confirm positive
637 // transmission.
638 uint8_t writeByte(uint8_t, uint8_t, uint8_t);
639
640 // This function sends is simliar to the one above and sends info to the MAX32664
641 // but takes an additional uint8_t as a paramter. Again there is the write
642 // of the specific bytes followed by a read to confirm positive transmission.
643 uint8_t writeByte(uint8_t, uint8_t, uint8_t, uint8_t);
644
645 // This function is the same as the function above and uses the given family,
646 // index, and write byte, but also takes a 16 bit integer as a paramter to communicate
647 // with the MAX32664 which in turn communicates with downward sensors. There
648 // are two steps demonstrated in this function. First a write to the MCU
649 // indicating what you want to do, a delay, and then a read to confirm positive
650 // transmission.
651 uint8_t writeByte(uint8_t, uint8_t, uint8_t, uint16_t);
652
653 // This function sends information to the MAX32664 to specifically write values
654 // to the registers of downward sensors and so also requires a
655 // register address and register value as parameters. Again there is the write
656 // of the specific bytes followed by a read to confirm positive transmission.
657 uint8_t writeLongBytes(uint8_t, uint8_t, uint8_t, int32_t _writeVal[3]);
658
659 // This function handles all read commands or stated another way, all information
660 // requests. It starts a request by writing the family byte, index byte, and
661 // delays 60 microseconds, during which the MAX32664 retrieves the requested
662 // information. An I-squared-C request is then issued, and the information is read and returned.
663 uint8_t readByte(uint8_t, uint8_t);
664
665 // This function is exactly as the one above except it accepts a Write Byte as
666 // a paramter. It starts a request by writing the family byte, index byte, and
667 // write byte to the MAX32664, delays 60 microseconds, during which
668 // the MAX32664 retrieves the requested information. A I-squared-C request is
669 // then issued, and the information is read and returned.
670 uint8_t readByte(uint8_t, uint8_t, uint8_t);
671
672 // This function handles all read commands or stated another way, all information
673 // requests. It starts a request by writing the family byte, an index byte, and
674 // a write byte and then then delays 60 microseconds, during which the MAX32664
675 // retrieves the requested information. An I-squared-C request is then issued,
676 // and the information is read. This differs from the above read commands in
677 // that it returns a 16 bit integer instead of 8.
678 uint16_t readIntByte(uint8_t, uint8_t, uint8_t);
679
680 // This function handles all read commands or stated another way, all information
681 // requests. It starts a request by writing the family byte, an index byte, and
682 // a write byte and then then delays 60 microseconds, during which the MAX32664
683 // retrieves the requested information. An I-squared-C request is then issued,
684 // and the information is read. This differs from the above read commands in
685 // that it returns a 4 byte (uint32_t) integer instead of 8.
686 uint32_t readLongByte(uint8_t, uint8_t, uint8_t);
687
688 // This function handles all read commands or stated another way, all information
689 // requests. It starts a request by writing the family byte, an index byte, and
690 // a write byte and then then delays 60 microseconds, during which the MAX32664
691 // retrieves the requested information. An I-squared-C request is then issued,
692 // and the information is read. This function is very similar to the one above
693 // except it returns three uint32_t bytes instead of one.
694 int32_t* readMultipleBytes(uint8_t, uint8_t, uint8_t, uint8_t, int32_t*);
695
696 // Needs comment - INCOMPLETE
697 uint8_t* readFillArray(uint8_t, uint8_t, uint8_t, uint8_t array[]);
698};
699#endif
DUMP_REGISTER_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:188
@ DUMP_REGISTER_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:190
@ DUMP_REGISTER_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:191
READ_REGISTER_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:172
@ READ_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:175
@ READ_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:174
DEVICE_MODE_WRITE_BYTES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:121
@ RESET
Definition: SparkFun_Bio_Sensor_Hub_Library.h:124
@ ENTER_BOOTLOADER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:125
@ EXIT_BOOTLOADER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:123
const uint8_t BIO_ADDRESS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:37
FIFO_EXTERNAL_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:153
@ READ_NUM_SAMPLES_INPUT
Definition: SparkFun_Bio_Sensor_Hub_Library.h:158
@ READ_NUM_SAMPLES_SENSOR
Definition: SparkFun_Bio_Sensor_Hub_Library.h:159
@ READ_INPUT_DATA
Definition: SparkFun_Bio_Sensor_Hub_Library.h:156
@ READ_SENSOR_DATA
Definition: SparkFun_Bio_Sensor_Hub_Library.h:157
@ SAMPLE_SIZE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:155
READ_AGC_ALGO_WRITE_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:247
@ READ_AGC_PERC_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:249
@ READ_AGC_SENSITIVITY_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:251
@ READ_MAX_FAST_COEF_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:253
@ READ_AGC_STEP_SIZE_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:250
@ READ_AGC_NUM_SAMPLES_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:252
FAMILY_REGISTER_BYTES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:90
@ CHANGE_ALGORITHM_CONFIG
Definition: SparkFun_Bio_Sensor_Hub_Library.h:106
@ ENABLE_SENSOR
Definition: SparkFun_Bio_Sensor_Hub_Library.h:104
@ READ_REGISTER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:101
@ READ_ALGORITHM_CONFIG
Definition: SparkFun_Bio_Sensor_Hub_Library.h:107
@ READ_SENSOR_MODE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:105
@ HUB_STATUS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:92
@ READ_ATTRIBUTES_AFE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:102
@ READ_DEVICE_MODE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:94
@ OUTPUT_MODE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:95
@ DUMP_REGISTERS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:103
@ READ_OUTPUT_MODE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:96
@ SET_DEVICE_MODE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:93
@ BOOTLOADER_FLASH
Definition: SparkFun_Bio_Sensor_Hub_Library.h:109
@ WRITE_INPUT
Definition: SparkFun_Bio_Sensor_Hub_Library.h:99
@ BOOTLOADER_INFO
Definition: SparkFun_Bio_Sensor_Hub_Library.h:110
@ ENABLE_ALGORITHM
Definition: SparkFun_Bio_Sensor_Hub_Library.h:108
@ READ_DATA_INPUT
Definition: SparkFun_Bio_Sensor_Hub_Library.h:98
@ WRITE_REGISTER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:100
@ IDENTITY
Definition: SparkFun_Bio_Sensor_Hub_Library.h:111
@ READ_DATA_OUTPUT
Definition: SparkFun_Bio_Sensor_Hub_Library.h:97
READ_SENSOR_ENABLE_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:204
@ READ_ENABLE_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:206
@ READ_ENABLE_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:207
ALGORITHM_CONFIG_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:212
@ SET_AVG_SAMPLES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:217
@ SET_SENSITIVITY
Definition: SparkFun_Bio_Sensor_Hub_Library.h:216
@ SET_STEP_SIZE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:215
@ SET_TARG_PERC
Definition: SparkFun_Bio_Sensor_Hub_Library.h:214
@ SET_PULSE_OX_COEF
Definition: SparkFun_Bio_Sensor_Hub_Library.h:218
SENSOR_ENABLE_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:196
@ ENABLE_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:198
@ ENABLE_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:199
WRITE_REGISTER_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:164
@ WRITE_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:166
@ WRITE_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:167
ALGORITHM_MODE_ENABLE_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:258
@ ENABLE_WHRM_ALGO
Definition: SparkFun_Bio_Sensor_Hub_Library.h:261
@ ENABLE_AGC_ALGO
Definition: SparkFun_Bio_Sensor_Hub_Library.h:260
GET_AFE_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:180
@ RETRIEVE_AFE_ACCELEROMETER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:183
@ RETRIEVE_AFE_MAX30101
Definition: SparkFun_Bio_Sensor_Hub_Library.h:182
IDENTITY_INDEX_BYTES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:285
@ READ_SENSOR_HUB_VERS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:288
@ READ_MCU_TYPE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:287
@ READ_ALGO_VERS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:289
OUTPUT_MODE_WRITE_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:131
@ SENSOR_AND_ALGORITHM
Definition: SparkFun_Bio_Sensor_Hub_Library.h:136
@ PAUSE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:133
@ ALGO_DATA
Definition: SparkFun_Bio_Sensor_Hub_Library.h:135
@ PAUSE_TWO
Definition: SparkFun_Bio_Sensor_Hub_Library.h:137
@ SENSOR_DATA
Definition: SparkFun_Bio_Sensor_Hub_Library.h:134
@ ALGO_COUNTER_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:139
@ SENSOR_ALGO_COUNTER
Definition: SparkFun_Bio_Sensor_Hub_Library.h:140
@ SENSOR_COUNTER_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:138
READ_ALGORITHM_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:235
@ READ_AGC_SENSITIVITY
Definition: SparkFun_Bio_Sensor_Hub_Library.h:239
@ READ_AGC_STEP_SIZE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:238
@ READ_AGC_PERCENTAGE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:237
@ READ_MAX_FAST_COEF
Definition: SparkFun_Bio_Sensor_Hub_Library.h:241
@ READ_AGC_NUM_SAMPLES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:240
BOOTLOADER_INFO_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:277
@ BOOTLOADER_VERS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:279
@ PAGE_SIZE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:280
ALGO_AGC_WRITE_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:224
@ AGC_SENSITIVITY_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:228
@ AGC_GAIN_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:226
@ AGC_STEP_SIZE_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:227
@ AGC_NUM_SAMP_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:229
@ MAXIMFAST_COEF_ID
Definition: SparkFun_Bio_Sensor_Hub_Library.h:230
FIFO_OUTPUT_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:145
@ NUM_SAMPLES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:147
@ READ_DATA
Definition: SparkFun_Bio_Sensor_Hub_Library.h:148
BOOTLOADER_FLASH_INDEX_BYTE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:266
@ SEND_PAGE_VALUE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:272
@ SET_NUM_PAGES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:270
@ SET_AUTH_BYTES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:269
@ SET_INIT_VECTOR_BYTES
Definition: SparkFun_Bio_Sensor_Hub_Library.h:268
@ ERASE_FLASH
Definition: SparkFun_Bio_Sensor_Hub_Library.h:271
READ_STATUS_BYTE_VALUE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:71
@ ERR_DATA_FORMAT
Definition: SparkFun_Bio_Sensor_Hub_Library.h:76
@ ERR_BTLDR_GENERAL
Definition: SparkFun_Bio_Sensor_Hub_Library.h:79
@ ERR_UNAVAIL_CMD
Definition: SparkFun_Bio_Sensor_Hub_Library.h:74
@ ERR_BTLDR_AUTH
Definition: SparkFun_Bio_Sensor_Hub_Library.h:81
@ ERR_UNKNOWN
Definition: SparkFun_Bio_Sensor_Hub_Library.h:83
@ ERR_INPUT_VALUE
Definition: SparkFun_Bio_Sensor_Hub_Library.h:77
@ ERR_BTLDR_INVALID_APP
Definition: SparkFun_Bio_Sensor_Hub_Library.h:82
@ ERR_TRY_AGAIN
Definition: SparkFun_Bio_Sensor_Hub_Library.h:78
@ SUCCESS
Definition: SparkFun_Bio_Sensor_Hub_Library.h:73
@ ERR_BTLDR_CHECKSUM
Definition: SparkFun_Bio_Sensor_Hub_Library.h:80
@ ERR_UNAVAIL_FUNC
Definition: SparkFun_Bio_Sensor_Hub_Library.h:75
Definition: SparkFun_Bio_Sensor_Hub_Library.h:294
uint8_t readAlgoRange()
This function reads and returns the currently set target percentage of the full-scale ADC range that ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1088
uint8_t bpmArrTwo[MAXFAST_ARRAY_SIZE+MAXFAST_EXTENDED_DATA]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:299
uint8_t * dumpRegisterMAX30101(uint8_t, uint8_t regArray[255])
This function returns all registers and register values sequentially of the MAX30101 sensor: register...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:950
version readAlgorithmVersion()
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1277
uint8_t numSamplesExternalSensor()
This function adds support for the acceleromter that is NOT included on SparkFun's product,...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:831
uint8_t _userSelectedMode
Definition: SparkFun_Bio_Sensor_Hub_Library.h:621
uint8_t configSensor()
This function sets very basic settings to get LED count values from the MAX30101. Sensor data include...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:164
uint32_t readLongByte(uint8_t, uint8_t, uint8_t)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1549
uint8_t accelControl(uint8_t)
This function enables the Accelerometer.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:743
uint8_t readSensorHubStatus()
The following function checks the status of the FIFO.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:109
uint8_t readByte(uint8_t, uint8_t, uint8_t)
uint8_t maximFastAlgoControl(uint8_t)
This function enables (one) or disables (zero) the wrist heart rate monitor algorithm.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1174
uint8_t writeLongBytes(uint8_t, uint8_t, uint8_t, int32_t _writeVal[3])
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1401
uint8_t beginBootloader(TwoWire &wirePort=Wire)
The following function puts the MAX32664 into bootloader mode. To place the MAX32664 into bootloader ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:84
uint8_t setAlgoRange(uint8_t)
This function sets the target percentage of the full-scale ADC range that the automatic gain control ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:984
bioData readSensorBpm()
This function takes the information of both the LED value and the biometric data from the MAX32664's ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:354
uint16_t readPulseWidth()
This function reads the CONFIGURATION_REGISTER (0x0A), bits [1:0] from the MAX30101 Sensor....
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:505
int32_t * readMultipleBytes(uint8_t, uint8_t, uint8_t, uint8_t, int32_t *)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1583
uint8_t readRegisterAccel(uint8_t)
This function reads the given register address for the MAX30101 Sensor and returns the values at that...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:888
uint8_t getMcuType()
The following function returns a byte that signifies the microcontoller that is in communcation with ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:671
void writeRegisterMAX30101(uint8_t, uint8_t)
This function writes the given register value at the given register address for the MAX30101 sensor a...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:847
uint8_t begin(TwoWire &wirePort=Wire)
The following function initializes the sensor. To place the MAX32664 into application mode,...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:56
uint8_t setSampleRate(uint16_t)
This function changes the sample rate of the MAX30101 sensor. The sample rate is affected by the set ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:532
uint8_t enableWrite(uint8_t, uint8_t, uint8_t)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1307
uint8_t * getDataOutFifo(uint8_t data[])
This function returns the data in the FIFO.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:818
sensorAttr getAfeAttributesAccelerometer()
This function retrieves the attributes of the AFE (Analog Front End) of the Accelerometer....
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:924
version readBootloaderVers()
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1223
uint8_t writeByte(uint8_t, uint8_t, uint8_t, uint8_t)
uint8_t * dumpRegisterAccelerometer(uint8_t, uint8_t regArray[])
This function returns all registers and register values sequentially of the Accelerometer: register z...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:969
int32_t * readMaximFastCoef(int32_t coefArr[3])
This function reads the maximum age for the wrist heart rate monitor (WHRM) algorithm....
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1137
uint8_t setMaximFastCoef(int32_t, int32_t, int32_t)
This function takes three values that are used as the Sp02 coefficients. These three values are multi...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1069
version readSensorHubVersion()
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1250
uint16_t readAdcRange()
MAX30101 Register: CONFIGURATION_REGISTER (0x0A), bits [6:5] This function returns the set ADC range ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:624
uint8_t setFifoThreshold(uint8_t)
This function changes the threshold for the FIFO interrupt bit/pin. The interrupt pin is the MFIO pin...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:788
bioData readBpm()
This function takes the 8 bytes from the FIFO buffer related to the wrist heart rate algortihm: heart...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:237
uint8_t writeByte(uint8_t, uint8_t, uint8_t)
uint8_t configBpm(uint8_t)
This function sets very basic settings to get sensor and biometric data. The biometric data includes ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:124
sensorAttr getAfeAttributesMAX30101()
This function retrieves the attributes of the AFE (Analog Front End) of the MAX30101 sensor....
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:902
uint8_t bpmSenArr[MAXFAST_ARRAY_SIZE+MAX30101_LED_ARRAY]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:301
uint8_t readMAX30101State()
This function checks if the MAX30101 is enabled or not.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:731
uint8_t agcAlgoControl(uint8_t)
This function enables (one) or disables (zero) the automatic gain control algorithm.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1153
uint8_t _resetPin
Definition: SparkFun_Bio_Sensor_Hub_Library.h:617
uint8_t readAlgoSensitivity()
This function returns the sensitivity (percentage) of the automatic gain control.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1110
uint8_t max30101Control(uint8_t)
This function enables the MAX30101.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:710
uint8_t setAdcRange(uint16_t)
MAX30101 Register: CONFIGURATION_REGISTER (0x0A), bits [6:5] This functions sets the dynamic range of...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:597
uint32_t _writeCoefArr[3]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:620
uint8_t _mfioPin
Definition: SparkFun_Bio_Sensor_Hub_Library.h:618
uint16_t readIntByte(uint8_t, uint8_t, uint8_t)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1517
uint8_t setAlgoSensitivity(uint8_t)
This function changes the sensitivity of the AGC algorithm.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1025
uint8_t _address
Definition: SparkFun_Bio_Sensor_Hub_Library.h:619
uint8_t readByte(uint8_t, uint8_t)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1431
uint8_t writeByte(uint8_t, uint8_t, uint8_t, uint16_t)
uint8_t bpmArr[MAXFAST_ARRAY_SIZE]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:298
uint8_t configSensorBpm(uint8_t)
This function sets very basic settings to get sensor and biometric data. Sensor data includes 24 bit ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:199
uint8_t setOutputMode(uint8_t)
This function enables the Accelerometer.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:765
bool setNumPages(uint8_t)
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1195
uint8_t bpmSenArrTwo[MAXFAST_ARRAY_SIZE+MAXFAST_EXTENDED_DATA+MAX30101_LED_ARRAY]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:302
uint8_t setPulseWidth(uint16_t)
This function modifies the pulse width of the MAX30101 LEDs. All of the LEDs are modified to the same...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:478
TwoWire * _i2cPort
Definition: SparkFun_Bio_Sensor_Hub_Library.h:625
bioData readSensor()
This function takes 9 bytes of LED values from the MAX30101 associated with the RED,...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:329
int32_t getBootloaderInf()
This function checks the version number of the bootloader on the chip and returns a four bytes: Major...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:687
uint8_t senArr[MAX30101_LED_ARRAY]
Definition: SparkFun_Bio_Sensor_Hub_Library.h:300
uint8_t setOperatingMode(uint8_t)
The following function is an alternate way to set the mode of the of MAX32664. It can take three para...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:646
uint8_t _sampleRate
Definition: SparkFun_Bio_Sensor_Hub_Library.h:622
uint8_t readRegisterMAX30101(uint8_t)
This function reads the given register address for the MAX30101 Sensor and returns the values at that...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:874
uint16_t readSampleRate()
This function reads the CONFIGURATION_REGISTER (0x0A), bits [4:2] from the MAX30101 Sensor....
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:562
uint8_t setAlgoSamples(uint8_t)
This function changes the number of samples that are averaged. It takes a paramater of zero to 255.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1046
bool eraseFlash()
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1204
void writeRegisterAccel(uint8_t, uint8_t)
This function writes the given register value at the given register address for the Accelerometer and...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:861
uint8_t * readFillArray(uint8_t, uint8_t, uint8_t, uint8_t array[])
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1484
uint8_t readAlgoStepSize()
This function returns the step size toward the target for the AGC algorithm. It returns a value betwe...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1100
uint8_t readAlgoSamples()
This function reads the number of samples that are averaged.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1121
uint8_t numSamplesOutFifo()
This function returns the number of samples available in the FIFO.
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:805
uint8_t setAlgoStepSize(uint8_t)
This function changes the step size toward the target for the AGC algorithm. It takes a paramater of ...
Definition: SparkFun_Bio_Sensor_Hub_Library.cpp:1005
Definition: SparkFun_Bio_Sensor_Hub_Library.h:39
uint32_t redLed
Definition: SparkFun_Bio_Sensor_Hub_Library.h:42
uint8_t confidence
Definition: SparkFun_Bio_Sensor_Hub_Library.h:44
uint32_t irLed
Definition: SparkFun_Bio_Sensor_Hub_Library.h:41
float rValue
Definition: SparkFun_Bio_Sensor_Hub_Library.h:47
uint16_t heartRate
Definition: SparkFun_Bio_Sensor_Hub_Library.h:43
int8_t extStatus
Definition: SparkFun_Bio_Sensor_Hub_Library.h:48
uint8_t reserveOne
Definition: SparkFun_Bio_Sensor_Hub_Library.h:49
uint8_t status
Definition: SparkFun_Bio_Sensor_Hub_Library.h:46
uint16_t oxygen
Definition: SparkFun_Bio_Sensor_Hub_Library.h:45
uint8_t resserveTwo
Definition: SparkFun_Bio_Sensor_Hub_Library.h:50
Definition: SparkFun_Bio_Sensor_Hub_Library.h:62
uint8_t availRegisters
Definition: SparkFun_Bio_Sensor_Hub_Library.h:65
uint8_t byteWord
Definition: SparkFun_Bio_Sensor_Hub_Library.h:64
Definition: SparkFun_Bio_Sensor_Hub_Library.h:54
uint8_t minor
Definition: SparkFun_Bio_Sensor_Hub_Library.h:57
uint8_t major
Definition: SparkFun_Bio_Sensor_Hub_Library.h:56
uint8_t revision
Definition: SparkFun_Bio_Sensor_Hub_Library.h:58