Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By nardev
#66561 I try this example with arduino and it works perfectly, when i send LOW the device i have starts buzzer and when i send HIGH it stops it.


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);
}
User avatar
By nardev
#66622 i fund out the issue, the buzzer is off only if it is hooked on 3.8 and bigger voltage, where ESP gives onlu about 3.3V during the digital high/low