我有一个温度传感器,它使用USB-I2C适配器连接(http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm) 我将此设备连接到我的Linux计算机(suse10)。 我输入的dmesg,看到如何检索数据从i2c设备通过USB在Linux中
usb 3-3: new full speed USB device using ohci_hcd and address 10
usb 3-3: new device found, idVendor=0403, idProduct=6001
usb 3-3: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-3: Product: FT232R USB UART
usb 3-3: Manufacturer: FTDI
usb 3-3: SerialNumber: A7007K93
usb 3-3: configuration #1 chosen from 1 choice
ftdi_sio 3-3:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 3-3: FTDI USB Serial Device converter now attached to ttyUSB0
但我不知道如何读的当前温度。
已更新1:其实I2C总线最多可以连接127个传感器。但我不知道如何列出可用传感器的地址。
任何人都可以给我一些提示吗?在此先感谢
谢谢,这是在正确的方向。但是,我不确定,我应该发送哪个命令。我只成功查询了火线的修订版号。我仍然无法扫描所有可能的设备地址(最大127)并且无法读取可用设备的值。 – stanleyxu2005 2009-10-13 15:03:02
您使用哪种温度传感器?有没有可用的数据表? – kgiannakakis 2009-10-13 18:58:56
嗨,我仍在搜索温度传感器的数据表。但我认为,即使没有任何数据表,它仍然应该有一种扫描方式,哪些地址被占用。可能吗? – stanleyxu2005 2009-10-14 08:49:10