Closed

Description
It's not uncommon to use tone with frequency = 0 to indicate 'silence/no note'.
Example: https://github.com/arduino/Arduino/blob/master/build/shared/examples/02.Digital/toneMelody/toneMelody.ino
This crashes right now, I expect because of a division in zero in: https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Tone.cpp
timer1_write((clockCyclesPerMicrosecond() * 500000) / frequency);
Admittedly the behavior on Arduino for frequency = 0 doesn't seem to be documented, and I expect on some other cores it would also crash or do weird things..
Metadata
Metadata
Assignees
Labels
No labels