Heart Rate 7 Click is the newest module from MikroE which uses VEM8080 photodetector has a wide range spectrum from 300nm - 1000nm. To control and acquisition data, AFE4404 from TI inc. is adopted. This chip permits control 3 LED channels, and sample heart rate default 100 SPS. A 22-bit ADC permit collecting very small changed voltage from a PD sensor. In this example we config Arduino Mega 2650 as below: Pin 4 for RST PIN 5 CLK PIN 6 INT PIN 20 SDA PIN 21 SCL Config registers follow the default of AFE4404 datasheet Page 27 with some minor changes. 1. Config Internal Clock through AFE_CONTROL2 register addr.: 0x23 value: 0x104218 // setup all dynamic power to save energy 2. Control LED2 current through AFE_LEDCNTRL register addr: 0x22 value: 0x000100 3. Read data using PROG_TG_EN signal through AFE_TIA_GAIN register addr: 0x21 value: 0x000125 Time to start and end of PROG_TG setup through two registers: AFE_PROG_TG_STC register (...