This commit is contained in:
dherrada 2021-08-20 13:46:30 -04:00
parent a8f4eec7be
commit fe3a245660

View file

@ -7,16 +7,15 @@ while True:
print("Slide switch off!") print("Slide switch off!")
cpx.pixels.fill((0, 0, 0)) cpx.pixels.fill((0, 0, 0))
continue continue
else: R = 0
R = 0 G = 0
G = 0 B = 0
B = 0 x, y, z = cpx.acceleration
x, y, z = cpx.acceleration print((x, y, z))
print((x, y, z)) if x:
if x: R = R + abs(int(x))
R = R + abs(int(x)) if y:
if y: G = G + abs(int(y))
G = G + abs(int(y)) if z:
if z: B = B + abs(int(z))
B = B + abs(int(z)) cpx.pixels.fill((R, G, B))
cpx.pixels.fill((R, G, B))