On a Beaglebone with Angstrom I have a weather cape that works fine with for sensor in /sys/devices/platform/omap/omap_i2c.3/i2c-3/*/*_input ; do echo -n "$(basename $sensor): " ; cat $sensor ; done but with the Debian 7.2 this directory structure does not seem to exist when used on the same hardware. It appears installed ok as in root@bbab299d0e59:/sys/devices/platform# i2cdetect -y -r 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- 40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- UU root@bbab299d0e59:/sys/devices/platform# 6,282,5218971,-;sht21 1-0040: initialized SUBSYSTEM=i2c DEVICE=+i2c:1-0040 6,283,5255436,-;tsl2550 1-0039: standard operating mode SUBSYSTEM=i2c DEVICE=+i2c:1-0039 6,284,5281571,-;tsl2550 1-0039: support ver. 1.2 enabled SUBSYSTEM=i2c DEVICE=+i2c:1-0039 4,285,5343764,-;i2c-core: driver [tsl2550] using legacy suspend method 4,286,5350348,-;i2c-core: driver [tsl2550] using legacy resume method 6,287,5357447,-;bmp085 1-0077: Successfully initialized bmp085! SUBSYSTEM=i2c DEVICE=+i2c:1-0077 I wondered how to access the sensors on Debian, with a goal of writing some sort of c/c++ logging and control. There seems to be no examples I can find anywhere for Debian.
↧