Mini V3 NodeMCU ESP8266EX WLAN module buzzer

I want to program my Mini V3 NodeMCU ESP8266EX WLAN module to warn when the Capacitive Moisture sensor shows that it is too dry. i get it to show values but i cant get it my buzzer to sound.

void setup() {
  pinMode(8, OUTPUT);
}

void loop() {
  digitalWrite(8, HIGH);
  delay(1000);
  digitalWrite(8, LOW);
  delay(1000);
}

I want to combine with this code

#define AOUT_PIN A0  // Arduino pin that connects to AOUT pin of moisture sensor

void setup() {
  Serial.begin(9600);
}

void loop() {
  int value = analogRead(AOUT_PIN);  // read the analog value from sensor

  Serial.print("Moisture: ");
  Serial.println(value);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.