i have submit a DEMO (http://forum.micropython.org/viewtopic.php?f=5&t=187 first Code).
if I use STRING operations in LCD there after awhile error. The system is stuck and all the LEDs light up.
The following script works with STRING without problems.
Can anyone understand the error with LCD?
Code: Select all
blueled = pyb.LED(4)
intensity = 0
counter = 1
switch = pyb.Switch()
s=""
while not switch():
intensity=intensity+counter
s+="g"
if intensity>15:
counter=-1
s=""
if intensity<1: counter=1
print(s)
blueled.intensity(intensity)
pyb.delay(10)