evert-arias / EasyBuzzer

The Beep Library For Arduino
https://evert-arias.github.io/EasyBuzzer
MIT License
84 stars 22 forks source link

Does not work on Mega #6

Closed mvackel closed 5 years ago

mvackel commented 5 years ago

The lib seems to be directed to Atmega328 and ESP8266/32. It does not work on Mega2560. To make it more general, I suggest the following change:  

Line 69 (and simillarly on line 120):

#if defined __AVR_ATmega328P__  
      noTone(mPin);
#endif // ! 

#if defined ESP32
  ledcDetachPin(mPin);
#endif // ! 

to:

#if defined ESP32
      ledcDetachPin(mPin);
#else
      noTone(mPin);
#endif // ! 
evert-arias commented 5 years ago

@mvackel Hi! Done! https://github.com/evert-arias/EasyBuzzer/pull/7 Thank you for your collaboration 👍 https://github.com/evert-arias/EasyBuzzer/releases/tag/v1.0.3

evert-arias commented 5 years ago

I will close this issue since it has been solved