How ever, when i adjust pin number and compile and upload the same sketch on ESP8266 (nodemcu) it simply starts buzzing always with tinny difference according to delay in the sketch.
p.s. tone() didn't work on arduino too and the device is completely closed i cant see what is inside, i only know what wire to use to hook the buzzer to arduino/nodemcu.
#define BUZZER_PIN 8
void setup() {
pinMode(BUZZER_PIN, OUTPUT);
digitalWrite(BUZZER_PIN, HIGH);
}
void loop() {
digitalWrite(BUZZER_PIN, LOW);
delay(500);
digitalWrite(BUZZER_PIN, HIGH);
delay(500);
}