Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By WereCatf
#38764 This should work, though I don't have a buzzer to test with.
Code: Select allvoid tone(uint8_t _pin, unsigned int frequency, unsigned long duration) {
pinMode (_pin, OUTPUT );
analogWriteFreq(frequency);
analogWrite(_pin,500);
delay(duration);
analogWrite(_pin,0);
}