Orodha ya maudhui:

Muziki wa Densi ya Jeneza la Astronomia Kutumia Arduino Uno: Hatua 5
Muziki wa Densi ya Jeneza la Astronomia Kutumia Arduino Uno: Hatua 5

Video: Muziki wa Densi ya Jeneza la Astronomia Kutumia Arduino Uno: Hatua 5

Video: Muziki wa Densi ya Jeneza la Astronomia Kutumia Arduino Uno: Hatua 5
Video: 🟡 POCO X5 PRO - САМЫЙ ДЕТАЛЬНЫЙ ОБЗОР и ТЕСТЫ 2024, Novemba
Anonim
Muziki wa Mastaa wa Jeneza la Mastronomia Kutumia Arduino Uno
Muziki wa Mastaa wa Jeneza la Mastronomia Kutumia Arduino Uno

Hii blogi hii tumekuonyesha Tune ya ngoma ya Astronomia Jeneza Na Arduino Uno

Kama nyinyi nyote mnajua juu ya kukumbuka nyuzi juu ya angani ya densi ya jeneza

kwa hivyo niliamua kufanya wimbo huu kwa kutumia arduino uno

Hapa kuna hatua na Ugavi uliotumiwa katika mradi huu na usimbuaji wa arduino

Hatua ya 1: Vipengele

Image
Image

Vipengele vinavyohitajika ni:

  • Arduino Uno / Nodemcu
  • Waya za Jumper
  • Spika / Buzzer
  • BC547 Transistor (hiari)
  • Iliyoongozwa (hiari)

Hatua ya 2: Uunganisho wa Arduino na Spika

Uunganisho wa Arduino Na Spika
Uunganisho wa Arduino Na Spika

Arduino na spika

hapa nimetumia bc547 transistor kama kipaza sauti kwa spika

Hatua ya 3: Uunganisho wa Arduino na Buzzer

Uunganisho wa Arduino na Buzzer
Uunganisho wa Arduino na Buzzer
Uunganisho wa Arduino na Buzzer
Uunganisho wa Arduino na Buzzer

Arduino Pamoja na Buzzer

Hatua ya 4: Msimbo wa Arduino

Jeneza la Ngoma Arduino Kanuni

Nambari ya astronomia ya Arduino imepewa hapa chini.

Nakili nambari hapa chini na ibandike katika Arduino IDE kisha upakie kwenye ubao wa Arduino.

#fafanua HAKUNA_B0 31

#fafanua NOTE_C1 33 #fasili NOTE_CS1 35 #fasili NOTE_D1 37 #fasili NOTE_DS1 39 #fafanua NOTE_E1 41 #fafanua NOTE_F1 44 #fafanua NOTE_FS1 46 #fafanua NOTE_G1 49 #fafanua NOTE_GS1 52 #fafanua #Define 55_aelezea 55 NOTE_C2 65 #fasili NOTE_CS2 69 #fasili NOTE_D2 73 #fasili NOTE_DS2 78 #fafanua NOTE_E2 82 #fasili NOTE_F2 87 #fafanua NOTE_FS2 93 #fafanua NOTE_G2 98 #fafanua NOTE_GS2 104 #fafanua NOTE_A2 110 #fafanua # 133aa # 0a2 #fafanua NOTE_CS3 139 #fasili NOTE_D3 147 #fasili NOTE_DS3 156 #fasili NOTE_E3 165 #fasili NOTE_F3 175 #fasili NOTE_FS3 185 #fafanua NOTE_G3 196 #fasili NOTE_GS3 208 #fafanua NOTAA 220 220 #fafanua NOTEAS7 233 NOTE_CS4 277 # define NOTE_D4 294 # define NOTE_DS4 311 # define NOTE_E4 330 # define NOTE_F4 349 # define NOTE_FS4 370 # define NOTE_G4 392 # define NOTE_GS4 415 # define NOTE_A4 440 # define NOTE_AS4 466 # define NOTE_B4 494 # define NOTE_C5 523 # define NOTE_CS5 554 #fafanua NOTE_D5 587 #fasili NOTE_DS5 622 #fasili NOT_E5 659 #fasili NOTE_F5 698 #fasili NOTE_FS5 740 #fasili NOTE_G5 784 #fasili NOTE_GS5 831 #fafanua NOTE_A5 880 #fafanua #Define # 104 hakufafanua NOTE_D6 1175 #fasili NOTE_DS6 1245 #fasili NOTE_E6 1319 #fasili NOTE_F6 1397 #fasili NOTE_FS6 1480 #fasili NOTE_G6 1568 #fafanua NOTE_GS6 1661 #fasili NOTE_A6 1760 #fafanua NOTE_AS6 1865 #fafanua NOT9B76766Dua # 2367Taarifa 2377666 # define NOTE_DS7 2489 # define NOTE_E7 2637 # define NOTE_F7 2794 # define NOTE_FS7 2960 # define NOTE_G7 3136 # define NOTE_GS7 3322 # define NOTE_A7 3520 # define NOTE_AS7 3729 # define NOTE_B7 3951 # define NOTE_C8 4186 # define NOTE_CS8 4435 # define NOTE_D8 4699 # define NOTE_DS8 4978 "ndani ya wimbo = {NOTE_A4, 0, NOTE_A4, NOTE_A4, NOTE_C5, 0, NOTE_AS4, NOTE_A4, NOTE_G4, 0, NOTE_G4, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_G4, 0, NOTE_G4, 0, SIE_AS 5, NOTE_A5, NOTE_AS5, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS, ATHAA, NOTE_D5, NOTE_D5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_F5, NOTE_F5, NOTE_F5, NOTE_F5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, Acha, SIKU NOTE_F4, NOTE_G4, 0, NOTE_G4, NOTE_D5, NOTE_C5, 0, NOTE_AS4, 0, NOTE_A4, 0, NOTE_A4, NOTE_A4, NOTE_C5, 0, NOTE_AS4, NOTE_A4, NOTE_G4, 0, NOTE_G4, NOTE_AS5, NOTE_A5, NOTE_AS, NOTE_G4, 0, NOTE_G4, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_G4, 0, NOTE_G4, NOTE_D5, NOTE_C5, 0, NOTE_AS4, 0, NOTE_A4, 0, NOTE_A4, NOTE_A4, NOTE_C5, 0, NOT4AS, 0, NOTE_G4, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_G4, 0, NOTE_G4, NOTE_AS5, NOTE_A5, NOTE_AS5, NOTE_A5, NOTE_A5}; // durations ya muda: 4 = noti ya robo, 8 = noti ya nane, nk. int noteDurations = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,},}; kuanzisha batili () {for (int thisNote = 0; thisNote <112; thisNote ++) {int noteDuration = 750 / noteDurations [thisNote]; sauti (7, melody [thisNote], noteDuration); int pauseBetweenNotes = noteDuration * 1.30; kuchelewesha (pauseBetweenNotes); hakuna Sauti (7); }} kitanzi batili () {}

Ilipendekeza: