© 2017 ROHM Co.,Ltd.
BH1790GLC-EVK-001
Software document
Feb/07/2017
Sensor Application G
P. 1
© 2017 ROHM Co.,Ltd.
Optical Sensor for Heart Rate Monitor (BH1790GLC)
Sketch file(BH1790GLC.ino)
setup function
Setup serial function(115200bps) to output log data on Serial Monitor
Initialize I2C(Wire.begin function) and setup I2C clock(400kHz)
Initialize BH1790GLC
Setup 32Hz timer and start
loop function
Check the flag about 32Hz period
Get the values Optical Sensor Data with LED ON/OFF and display them
timer_isr function
Function to execute @ 32Hz interval
P. 2
© 2017 ROHM Co.,Ltd.
Optical Sensor for Heart Rate Monitor (BH1790GLC)
Library files (BH1790GLC.h, BH1790GLC.cpp)
constructor
do nothing
init function
1. Read and check PART_ID, PID and MANUFACTURER_ID register value
2. Write to MEAS_CONTROL1 register (RDY=1, LED_LIGHTING_FREQ=128Hz,
RCYCLE=32Hz)
3. Write to MEAS_CONTROL2 register
(LED_EN[1:0] = 00, LED_ON_TIME=0.3ms, LED_CURRENT=10mA)
4. Write to MEAS_START register (MEAS_ST=1)
get_rawval function
Get the 4bytes raw value from register address 0x54
get_val function
Execute get_rawval function
Create Optical Sensor Data with LED ON/OFF
write function
General write function for BH1790GLC
read function
General read function for BH1790GLC
© 2017 ROHM Co.,Ltd.
R1102
A
www.rohm.com
© 201 ROHM Co., Ltd. All rights reserved.
Notice
ROHM Customer Support System
http://www.rohm.com/contact/
Thank you for your accessing to ROHM product informations.
More detail product informations and catalogs are available, please contact us.
Notes
The information contained herein is subject to change without notice.
Before you use our Products, please contact our sales representative
and verify the latest specifica-
tions :
Although ROHM is continuously working to improve product reliability and quality, semicon-
ductors can break down and malfunction due to various factors.
Therefore, in order to prevent personal injury or fire arising from failure, please take safety
measures such as complying with the derating characteristics, implementing redundant and
fire prevention designs, and utilizing backups and fail-safe procedures. ROHM shall have no
responsibility for any damages arising out of the use of our Poducts beyond the rating specified by
ROHM.
Examples of application circuits, circuit constants and any other information contained herein are
provided only to illustrate the standard usage and operations of the Products. The peripheral
conditions must be taken into account when designing circuits for mass production.
The technical information specified herein is intended only to show the typical functions of and
examples of application circuits for the Products. ROHM does not grant you, explicitly or implicitly,
any license to use or exercise intellectual property or other rights held by ROHM or any other
parties. ROHM shall have no responsibility whatsoever for any dispute arising out of the use of
such technical information.
The Products are intended for use in general electronic equipment (i.e. AV/OA devices, communi-
cation, consumer systems, gaming/entertainment sets) as well as the applications indicated in
this document.
The Products specified in this document are not designed to be radiation tolerant.
For use of our Products in applications requiring a high degree of reliability (as exemplified
below), please contact and consult with a ROHM representative : transportation equipment (i.e.
cars, ships, trains), primary communication equipment, traffic lights, fire/crime prevention, safety
equipment, medical systems, servers, solar cells, and power transmission systems.
Do not use our Products in applications requiring extremely high reliability, such as aerospace
equipment, nuclear power control systems, and submarine repeaters.
ROHM shall have no responsibility for any damages or injury arising from non-compliance with
the recommended usage conditions and specifications contained herein.
ROHM has used reasonable care to ensur the accuracy of the information contained in this
document. However, ROHM does not warrants that such information is error-free, and ROHM
shall have no responsibility for any damages arising from any inaccuracy or misprint of such
information.
Please use the Products in accordance with any applicable environmental laws and regulations,
such as the RoHS Directive. For more details, including RoHS compatibility, please contact a
ROHM sales office. ROHM shall have no responsibility for any damages or losses resulting
non-compliance with any applicable laws or regulations.
When providing our Products and technologies contained in this document to other countries,
you must abide by the procedures and provisions stipulated in all applicable export laws and
regulations, including without limitation the US Export Administration Regulations and the Foreign
Exchange and Foreign Trade Act.
This document, in part or in whole, may not be reprinted or reproduced without prior consent of
ROHM.
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
14)