Jump to content

NodeMCU Projects: Difference between revisions

(→‎NeoPixel: new version)
Line 72:
 
def rand():
return urandom.getrandbits(87)
 
def cycle():
Line 132:
np[j] = (0, 0, val)
np.write()
 
def clock():
for k in range(10):
for i in range(16):
if i%2 == 0:
np[i] = (64,0,10)
np.write()
else:
np[i] = (10,64,0)
np.write()
time.sleep_ms(200)
 
for j in range(16):
if j%2 == 0:
np[j] = (10,64,0)
np.write()
else:
np[j] = (64,10,0)
np.write()
time.sleep_ms(200)
 
def bounce():
for i in range(53):
x,y,z = rand(),rand(),rand()
for i in range(4 * 16):
Line 164 ⟶ 184:
 
fade()
off()
time.sleep(1)
 
clock()
off()
time.sleep(1)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.