From f562231c49a882ae40cbd60760432acc368667eb Mon Sep 17 00:00:00 2001 From: James Bowman Date: Mon, 25 Feb 2019 07:06:31 -0800 Subject: [PATCH] Clean up a little --- python/samples/EDS-color-compass.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/samples/EDS-color-compass.py b/python/samples/EDS-color-compass.py index d2c0e21..aa841df 100644 --- a/python/samples/EDS-color-compass.py +++ b/python/samples/EDS-color-compass.py @@ -13,8 +13,6 @@ https://electricdollarstore.com """ import sys -import struct -import time from i2cdriver import I2CDriver, EDS @@ -23,8 +21,8 @@ if __name__ == '__main__': magnet = EDS.Magnet(i2) led = EDS.LED(i2) - led.rgb(0, 0, 0) - while 1: + + while True: (x, y, z) = magnet.measurement() r = max(0, min(255, (x + 4000) // 32)) g = max(0, min(255, (y + 4000) // 32))