Arduino demo code for the Modern Device SI1143-based pulse sensor, covering initialization, data reading, averaging and output.
This document is the SI114_Pulse_Demo.ino sketch for the Modern Device SI1143-based pulse sensor, written for Arduino. It initializes the sensor, reads red, IR1 and IR2 values, averages them, and prints heartbeat and BPM data.
The code includes setup and loop functions, a smoothing routine, and optional blocks for power-line sampling, ambient light sampling, LED value printing and pulse reading. It also contains a table of Arduino and JeeNode port settings for I2C connections.
| I2C port | 0 |
|---|---|
| Samples averaged | 5 |
| Serial baud rate | 115200 |
| Sensor part ID | 0x17 |
| Measurement rate | 0x84 |
| ALS rate | 0x08 |
| PS rate | 0x08 |
| LED current setting | 0x38 |
| LED 3 current | 0x02 |
| ADC gain | 0x00 |
| Channel list | 0x77 |
| PS1/PS2/PS3 ADC mux | 0x03 |
| ADC counter | B01110000 |
It initializes the SI1143-based pulse sensor, reads the red, IR1 and IR2 values, averages them, and prints heartbeat and BPM data.
Port 0 uses the native Arduino I2C pins on A4 and A5, which are SDA and SCL.
The default is 5 samples, which can be increased for a smoother waveform.
It prints "found new finger" and primes the filters for the first 20 readings.