Skip to content

Commit d675c99

Browse files
authored
Merge pull request #63 from dcbriccetti/simplify-and-improve
Remove unneeded variables and conditions
2 parents 965fdd3 + 1784060 commit d675c99

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

examples/circuitplayground_acceleration_neopixels.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,4 @@
1818
B = 0
1919
x, y, z = cpx.acceleration
2020
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))
21+
cpx.pixels.fill(((R + abs(int(x))), (G + abs(int(y))), (B + abs(int(z)))))

0 commit comments

Comments
 (0)