Running on the latest nodemcu firmware (stable channel)
When running the lines one by one the three tones are sounding.
However when a file is saved on the esp file system and I use dofile command to call it, the following error is raised:
PANIC: unprotected error in call to Lua API (bz.lua:12: attempt to concatenate global 'freq' (a nil value))"
It seems that the code cannot initialize the freq variable correctly.
Running on the latest nodemcu firmware (stable channel)
When running the lines one by one the three tones are sounding.
However when a file is saved on the esp file system and I use dofile command to call it, the following error is raised:
PANIC: unprotected error in call to Lua API (bz.lua:12: attempt to concatenate global 'freq' (a nil value))"
It seems that the code cannot initialize the freq variable correctly.