From 7901d8dbd9dd02e6f360e2cf2bd11d1fa5e4a272 Mon Sep 17 00:00:00 2001 From: AykoPoel Date: Thu, 1 Jan 2015 14:55:26 +0100 Subject: [PATCH] Update autorotate.py --- autorotate/autorotate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autorotate/autorotate.py b/autorotate/autorotate.py index 9e8de85..ac0d474 100755 --- a/autorotate/autorotate.py +++ b/autorotate/autorotate.py @@ -36,7 +36,7 @@ freq = 10.0 # frequency to read the accelerometer # Look for accelerometer while count <= 9: if os.path.exists('/sys/bus/iio/devices/iio:device' + str(count) + '/in_accel_scale') == True: - dpath = '/sys/bus/iio/devices/iio:device0/' # directory of accelerometer device (iio) + dpath = '/sys/bus/iio/devices/iio:device' + str(count) + '/' # directory of accelerometer device (iio) break count = count + 1 #print(dpath)