Using nuttx i2c scan to detect MAX30100

I’m creating a NuttX driver for MAX30100 Pulse Oximeter Heart Rate sensor. At first my noticed the sensor wasn’t responding, then I searched in the Internet and discovered that the board model I was using has an issue:

https://www.teachmemicro.com/max30100-arduino-heart-rate-sensor/

They connected the pull-up resistor of SCL and SDA lines to 1.8V.

After fixing it I used the i2c scan and it worked:

nsh> i2c bus
BUS EXISTS?
Bus 1: YES

nsh> i2c dev 0x00 0x7f
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

nsh> i2c get -a 57 -r ff
READ Bus: 1 Addr: 57 Subaddr: ff Value: 11
nsh>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s