Bestilt før kl. 14.00 på hverdage = afsendt samme dag 30 dages fortrydelsesret 1 års garanti
← Terug til oversigten

Tilslutningsdiagram og kodeeksempel

Sådan tilslutter du Aktiv buzzer-modul til en Arduino UNO eller ESP32, med en eksempelsketch, du kan uploade med det samme.

Active Buzzer Beep Demo

Dette projekt viser, hvordan man styrer et active buzzer module med en Arduino Uno. Active buzzeret genererer en tone med fast frekvens, hver gang signalbenet sættes til HIGH. Koden tænder og slukker buzzeren gentagne gange for at skabe et enkelt bipmønster.

Tilslutningsdiagram: Aktiv buzzer-modul på en Arduino UNO
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: Aktiv buzzer-modul på en Arduino UNO
Tilslutningstabel · Klik for at forstørre
Active_Buzzer_Beep_Demo.ino · kompileret og testet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : Active Buzzer Beep Demo
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Active Buzzer Module
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

const int BUZZER_PIN = 8;

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);
  Serial.begin(115200);
  Serial.println(F("Active Buzzer Demo Ready"));
}

void loop() {
  // Turn the buzzer on
  Serial.println(F("Buzzer ON"));
  digitalWrite(BUZZER_PIN, HIGH);
  delay(200);

  // Turn the buzzer off
  Serial.println(F("Buzzer OFF"));
  digitalWrite(BUZZER_PIN, LOW);
  delay(800);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Active Buzzer-beepdemo med ESP32

Dette projekt viser, hvordan man styrer et active buzzer-modul med en ESP32. Sketchen tænder og slukker buzzer'en i et gentaget beep-mønster, mens den aktuelle status vises i Serial Monitor.

Tilslutningsdiagram: Aktiv buzzer-modul på en ESP32 DevKit V1
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: Aktiv buzzer-modul på en ESP32 DevKit V1
Tilslutningstabel · Klik for at forstørre
Active_Buzzer_Beep_Demo_with_ESP32.ino · kompileret og testet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : Active Buzzer Beep Demo with ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Active Buzzer Module
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

// Active Buzzer Demo for ESP32 DEVKIT V1
// Connect the buzzer signal pin to GPIO 4 (D4 on silkscreen)

const int BUZZER_PIN = 4;

void setup() {
  Serial.begin(115200);
  pinMode(BUZZER_PIN, OUTPUT);
  digitalWrite(BUZZER_PIN, LOW);
  Serial.println("Active Buzzer Demo Ready");
}

void loop() {
  // Turn the buzzer ON
  Serial.println("Buzzer ON");
  digitalWrite(BUZZER_PIN, HIGH);
  delay(200);

  // Turn the buzzer OFF
  Serial.println("Buzzer OFF");
  digitalWrite(BUZZER_PIN, LOW);
  delay(200);

  // Second beep
  Serial.println("Buzzer ON");
  digitalWrite(BUZZER_PIN, HIGH);
  delay(200);

  // Pause between beep sequences
  Serial.println("Buzzer OFF (Pause)");
  digitalWrite(BUZZER_PIN, LOW);
  delay(1000);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Set for nylig

MQ-4 Gassensor Modul

MQ-4 Gassensor Modul

€ 2,45
Servo S3003 360 grader

Servo S3003 360 grader

€ 5,70
KY-002 vibrationssensor modul

KY-002 vibrationssensor modul

€ 1,10
MQ-9 Gassensor modul

MQ-9 Gassensor modul

€ 2,70
4x4 matrix keypad sort

4x4 matrix keypad sort

€ 3,45
Se
3x4 matrix keypad sort

3x4 matrix keypad sort

€ 3,40
Touch Module TTP223B 1-kanals

Touch Module TTP223B 1-kanals

€ 0,99
Se
ESP32 CAM Micro USB adapter / programmer

ESP32 CAM Micro USB adapter / programmer

€ 2,20
Luftfugtighed styret relæ

Luftfugtighed styret relæ

€ 3,90
Raspberry Pi Pico 2W

Raspberry Pi Pico 2W

€ 9,15
Se
Flydeafbryder P45

Flydeafbryder P45

€ 2,10
Digital Barometer Tryksensor Modul BMP280

Digital Barometer Tryksensor Modul BMP280

€ 1,40
TCRT5000 module optisk sensor

TCRT5000 module optisk sensor

€ 1,60