Tekko BDSimSimulatorProjects

tone() দিয়ে গান বাজাওPlay a song with tone()

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Arduino Uno D8→Buzzer +
Buzzer -→Arduino Uno GND.3

Code (Arduino C++)

// Twinkle twinkle little star on a buzzer
int notes[] = {262, 262, 392, 392, 440, 440, 392, 349, 349, 330, 330, 294, 294, 262};
int beats[] = {1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2};

void setup() {
  for (int i = 0; i < 14; i++) {
    tone(8, notes[i], 300 * beats[i]);
    delay(350 * beats[i]);
  }
  noTone(8);
}

void loop() {
}

ভিডিও · Videos

Use a Buzzer with Arduino | Bangla TutorialBuzzer Melody with Pushbutton and Arduino

আরো project · More projects