Postingan

Menampilkan postingan dari September, 2025

Arduino Buzzer Music Tutorial (Play Do-Re-Mi with Arduino)

 Yo squad! 👋 In this project, we’re gonna make our Arduino sing like a baby piano using a buzzer . Yup, we’re coding some simple notes (Do-Re-Mi-Fa-Sol-La-Si-Do) so your Arduino can vibe with you  Stuff You’ll Need 1x Arduino UNO 1x Active Buzzer / Piezo Buzzer 🔊 Jumper Wires USB Cable to connect Arduino to PC Wiring Guide Check the wiring on the diagram 👆 Buzzer (+) → Pin 9 on Arduino Buzzer (–) → GND That’s it. Super simple. EZ clap 👌 The Code Here’s the full sketch. Copy-paste into Arduino IDE and upload ⬇️ const int buzzerPin = 9; // Pin for the buzzer // Frequency for each musical note const int NOTE_C = 261; const int NOTE_D = 294; const int NOTE_E = 329; const int NOTE_F = 349; const int NOTE_G = 392; const int NOTE_A = 440; const int NOTE_B = 493; const int NOTE_C_HIGH = 523; void setup() {   pinMode(buzzerPin, OUTPUT); // Set buzzer pin as output } void loop() {   playTone(NOTE_C);      // Do   playTone(NOTE_D...

Arduino + Ultrasonic Sensor HC-SR04 Tutorial

Gambar
 Yo fam! 👋 Today we’re diving into the HC-SR04 ultrasonic sensor and hooking it up with an Arduino UNO . This sensor is like echolocation for bats it measures distance using sound waves. Let’s make it happen!  Stuff You’ll Need Arduino UNO HC-SR04 Ultrasonic Sensor Breadboard (optional, but neat) Jumper wires (male-to-male) USB cable to plug into your laptop Wiring Guide Check the wiring in the diagram 👆 VCC → 5V (red wire) GND → GND (black wire) Trig → Pin 8 (green wire) Echo → Pin 9 (green wire) Super simple: just 4 wires and you’re good 💯 this ur code guys : const int TRIGPIN = 8; const int ECHOPIN = 9; long timer; int distance; void setup() {   Serial.begin(9600);        // open serial monitor   pinMode(ECHOPIN, INPUT);   // echo pin as input   pinMode(TRIGPIN, OUTPUT);  // trig pin as output } void loop() {   // send trigger signal   digitalWrite(TRIGPIN, LOW);   delayM...

Arduino Traffic Light Project >>>> Super Easy Tutorial for Beginners

Gambar
 Yo guys!  Today we’re gonna make a simple traffic light system using an Arduino UNO + breadboard + some LEDs . Don’t stress, it’s beginner-friendly and lowkey fun to do. Let’s gooo! Stuff You’ll Need 1x Arduino UNO (our lil’ brain 🧠) 1x Breadboard (the playground for components) 3 LEDs (Red ❤️, Yellow 💛, Green 💚) – actually 6 if you copy my code 6 Resistors (220Ω or 330Ω, so the LEDs don’t go boom 💥) Jumper Wires (a bunch, trust me) USB Cable (to connect Arduino to your PC/laptop)  Circuit Setup Check out the setup in the pic 👇 Connect the LEDs to pins 2, 3, 4 (for the first set) and pins 5, 6, 7 (for the second set). Each LED must go through a resistor to GND . Long leg (anode/+) → Arduino pin. Short leg (cathode/-) → resistor → GND. Basically: 🔴 Red LED → pin 2 & 5 🟡 Yellow LED → pin 3 & 6 🟢 Green LED → pin 4 & 7 this ur code : int LedMerah = 2; int LedKuning = 3; int LedHijau = 4; int LedMerah1 = 5; int LedKu...

How to Make Arduino LCD Show Lyrics in wokwi

Gambar
Yo fam! Today we’re gonna cook up something cool with Arduino: making an LCD display your fav lyrics with a typewriter effect 🤯. Perfect if you wanna flex your Arduino skills on your friends or just make your own DIY karaoke machine 😂. What You Need 1x Arduino UNO 1x LCD 20x4 with I2C backpack Jumper wires (aka drip cables) (Optional) Breadboard if you like things nead Circuit Setup Wire it like this (super simple cuz I2C saves lives): LCD GND → Arduino GND LCD VCC → Arduino 5V LCD SDA → Arduino A4 LCD SCL → Arduino A5 Boom. Done. No messy spaghetti wiring here. Before coding, make sure you got these libraries in your Arduino IDE or Wokwi: #include <Wire.h> #include <LiquidCrystal_I2C.h> The Code Here’s the full code you can use (yes, already polished for LCD 20x4): #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 20, 4); // I2C address, LCD 20x4 // Lyrics list String lirik[] = {   "Tante...", ...