MP3JOSS

Ngomongin Buzzer Yuk! Aktif vs Pasif #Arduino #buzzer

Ngomongin Buzzer Yuk! Aktif vs Pasif #Arduino #buzzer

Choose Download Format

Download MP3 Download MP4

Details

TitleNgomongin Buzzer Yuk! Aktif vs Pasif #Arduino #buzzer
AuthorWahyu Dharsito
Duration6:05
File FormatMP3 / MP4
Original URL https://youtube.com/watch?v=uV45sn4AIOE

Description

Ngomongin Buzzer Yuk! Aktif vs Pasif #Arduino #buzzerbeater

Link afiliasi:
Arduino Uno CH340 : https://s.shopee.co.id/6fW89mMxG4
Arduino Uno 16U2: https://s.shopee.co.id/6ppYM5MJv7
Layar LCD 1602: https://s.shopee.co.id/708yYOLgaA


=========================================

#include "Wire.h"
#include "LCD_I2C.h"

LCD_I2C lcd(0x27, 16, 2); // Change 0x27 if your LCD I2C address is different

#define BUZZER_ACTIVE 5
#define BUZZER_PASSIVE 6

void setup() {
pinMode(BUZZER_ACTIVE, OUTPUT);
pinMode(BUZZER_PASSIVE, OUTPUT);

lcd.begin();
lcd.backlight();
lcd.clear();
}

void loop() {
// --- Active buzzer ---
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("BUZZER ACTIVE");

digitalWrite(BUZZER_ACTIVE, HIGH); // Turn on active buzzer
delay(1000);
digitalWrite(BUZZER_ACTIVE, LOW); // Turn it off

delay(500); // Small gap between sequences

// --- Passive buzzer ---
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("BUZZER PASSIVE");

tone(BUZZER_PASSIVE, 262); // C4
delay(500);
tone(BUZZER_PASSIVE, 294); // D4
delay(500);
tone(BUZZER_PASSIVE, 330); // E4
delay(500);
noTone(BUZZER_PASSIVE); // Stop tone

delay(1000); // Wait before looping again
}

🎧 Just For You

🎵 Victory Lap - Fred Again..., Skepta &… 🎵 Pas Jalouse - Bamby & Kerchak 🎵 We Pray - Coldplay Feat. Little Simz… 🎵 Tonight - Pinkpantheress 🎵 Soda Pop - Saja Boys 🎵 Deck The Halls - Nat King Cole 🎵 Forever Young - David Guetta, Alphaville… 🎵 Blurred Lines - Robin Thicke Feat… 🎵 Beautiful People - David Guetta & Sia 🎵 Firework - Katy Perry 🎵 A Bar Song (Tipsy) - Shaboozey 🎵 That's So True - Gracie Abrams