Hi,
I did some test with a modified example for AMP audio skin.
The same wave file as in AMP Audio skin are used.
If i try a at command line all is working fine.
but if the saqme commands are saved in file (play.py) and this file is executed it only works first time.
If this sequence of commands are executed at command line also more than one time all is working fine.
Play.py:
-------------------------------------------------------------
import wave
from pyb import DAC
dac = DAC(1)
f = wave.open('test.wav')
f.setpos(0)
dac.write_timed(f.readframes(f.getnframes()), f.getframerate())
f.close()
------------------------------------------------------------------
After second execfile("Play.py") execution all LEDs are switched on (Sequence: red -> red+green -> red+green+yellow -> red+green+yellow +blue -> green+yellow +blue -> yellow +blue -> blue) the micropython board seem to crash.
Why is the behavior from sequence execution by commandline other than by execfile?
Any ways known to solve it?
Best regards,
Frank