Skip to content

Commit 999ca3c

Browse files
committed
Remove unneeded variables and conditions
1 parent fc735f8 commit 999ca3c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

examples/circuitplayground_acceleration_neopixels.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
cpx.pixels.fill((0, 0, 0))
1414
continue
1515
else:
16-
R = 0
17-
G = 0
18-
B = 0
1916
x, y, z = cpx.acceleration
2017
print((x, y, z))
21-
if x:
22-
R = R + abs(int(x))
23-
if y:
24-
G = G + abs(int(y))
25-
if z:
26-
B = B + abs(int(z))
27-
cpx.pixels.fill((R, G, B))
18+
cpx.pixels.fill((abs(int(x)), abs(int(y)), abs(int(z))))

0 commit comments

Comments
 (0)