variable renaming
This commit is contained in:
parent
cd23946642
commit
7a62606e66
1 changed files with 4 additions and 4 deletions
|
|
@ -7,14 +7,14 @@ pixels.fill(0)
|
|||
|
||||
while True:
|
||||
|
||||
x_float, y_float, z_float = cpx.acceleration # read acceleromter
|
||||
x, y, z = cpx.acceleration # read acceleromter
|
||||
r, g, b = 0, 0, 0
|
||||
|
||||
if abs(x_float) > 4.0:
|
||||
if abs(x) > 4.0:
|
||||
r = 255
|
||||
if abs(y_float) > 2.0:
|
||||
if abs(y) > 2.0:
|
||||
g = 255
|
||||
if z_float > -6.0 or z_float < -12.0:
|
||||
if z > -6.0 or z < -12.0:
|
||||
b = 255
|
||||
|
||||
pixels.fill((r,g,b))
|
||||
|
|
|
|||
Loading…
Reference in a new issue