5 get temperature of lm75 – Artesyn COMX-P2020 BSP User Guide (July 2014) User Manual

Page 102

Advertising
background image

Linux Deployment

COMX-P2020 BSP User Guide (6806800L84B)

102

I2CBUS is an integer or an I2C bus name

ADDRESS is an integer (0x03 - 0x77)

MODE is one of:

b (read byte data, default)

w (read word data)

c (write byte/read byte)

Append p for SMBus PEC

[root@COMX-P2020 /]#

To Read the first byte of AT24C02, run the command:

[root@COMX-P2020 /]# ./usr/sbin/i2cget 0 0x50 0

WARNING! This program can confuse your I2C bus, cause data loss and

worse!

I will read from device file /dev/i2c-0, chip address 0x50, data

address

0x00, using read byte data.

Continue? [Y/n] y

0x4e

[root@COMX-P2020 /]#

7.5

Get Temperature of LM75

[root@P2020RDB lib]# /usr/sbin/i2cget 1 0x48 0

WARNING! This program can confuse your I2C bus, cause data loss and

worse!

I will read from device file /dev/i2c-1, chip address 0x48, data

address

Advertising