Aktiivinen summerimoduuli Arduino-projektiisi.
SKU: OT2001-D123 Tuotenumero: AB011 EAN: 8598008139881 Sijainti: D12.03
Vaihtoehto
Passiivinen summerimoduuli Arduinoon
€ 1,25
Katso tämä vaihtoehto
Näin kytket Aktiivinen summerimoduuli:n Arduino UNOon tai ESP32:een, mukana esimerkkisketsi, jonka voit ladata heti.
Tämä projekti näyttää, miten active buzzer -moduulia ohjataan Arduino Uno -kortilla. Active buzzer tuottaa kiinteätaajuisen äänimerkin aina, kun signaalinasta asetetaan tilaan HIGH. Koodi kytkee summerin toistuvasti päälle ja pois luodakseen yksinkertaisen piippausvaroituksen.
/*
* ==================================================================
* 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
Tämä projekti näyttää, miten active buzzer -moduulia ohjataan ESP32:lla. Sketch kytkee summerin päälle ja pois toistuvassa piippauskuviossa ja näyttää nykyisen tilan Serial Monitorissa.
/*
* ==================================================================
* 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
Aktiivinen summerimoduuli Arduino-projektiisi.
Mitat
Pituus: 1,9cm
Leveys: 1,5cm
Korkeus: 1,2cm
| Leveys | 1,5 cm |
|---|---|
| Sopii | Arduino |
| Pituus | 1,9 cm |
| Korkeus | 1,2 cm |
Ei vielä arvosteluja.
Etkö ole tyytyväinen? Sinulla on 30 päivää aikaa vastaanotosta palauttaa tuote.
Kaikki palautuksista
Aktiivinen summerimoduuli