{"id":2445,"date":"2024-10-02T22:05:18","date_gmt":"2024-10-02T19:05:18","guid":{"rendered":"https:\/\/www.aydiner.gen.tr\/?p=2445"},"modified":"2024-10-02T22:06:16","modified_gmt":"2024-10-02T19:06:16","slug":"arduino-led-ve-buzzer-kullanarak-uygulama-yapiyoruz","status":"publish","type":"post","link":"https:\/\/www.aydiner.gen.tr\/index.php\/2024\/10\/02\/arduino-led-ve-buzzer-kullanarak-uygulama-yapiyoruz\/","title":{"rendered":"Arduino Led ve Buzzer Kullanarak Uygulama Yap\u0131yoruz."},"content":{"rendered":"<p>Arduino kullanarak LED ve buzzer ile yapabilece\u011finiz \u00f6rnek bir uygulama:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\nint ledPin = 13; \/\/ LED&#039;in ba\u011fl\u0131 oldu\u011fu pin\r\nint buzzerPin = 9; \/\/ Buzzer&#039;in ba\u011fl\u0131 oldu\u011fu pin\r\n\r\nvoid setup() {\r\n  pinMode(ledPin, OUTPUT); \/\/ LED pinini \u00e7\u0131k\u0131\u015f olarak ayarla\r\n  pinMode(buzzerPin, OUTPUT); \/\/ Buzzer pinini \u00e7\u0131k\u0131\u015f olarak ayarla\r\n}\r\n\r\nvoid loop() {\r\n  digitalWrite(ledPin, HIGH); \/\/ LED&#039;i yak\r\n  tone(buzzerPin, 100); \/\/ Buzzer&#039;a frekans vererek ses \u00e7al\r\n  delay(100); \/\/ Bir saniye bekle\r\n\r\n  digitalWrite(ledPin, LOW); \/\/ LED&#039;i s\u00f6nd\u00fcr\r\n  noTone(buzzerPin); \/\/ Buzzer&#039;\u0131 kapat (sesi durdur)\r\n  delay(100); \/\/ Bir saniye bekle \r\n\r\n}\r\n\r\n<\/pre>\n<p>Bu kodda hem bir LED&#8217;i hem de bir buzzer&#8217;\u0131 kontrol ediyoruz. `tone()` fonksiyonu ile buzzer&#8217;a frekans vererek ses \u00e7alarken `noTone()` fonksiyonu ile sesi durduruyoruz. Ayn\u0131 anda ise `digitalWrite()` fonksiyonunu kullanarak LED&#8217;i yak\u0131p s\u00f6nd\u00fcr\u00fcyoruz.<\/p>\n<p>Bu \u015fekilde Arduino kart\u0131n\u0131zda bu kodlar\u0131 \u00e7al\u0131\u015ft\u0131rarak hem bir ledi hem de bir buzzer&#8217;\u0131 kontrol edebilirsiniz.<\/p>\n<p>Buradaki 100, tonun frekans\u0131n\u0131 belirtmektedir. Yani buzzer\u0131n \u00fcretece\u011fi sesin y\u00fcksekli\u011fi veya d\u00fc\u015f\u00fckl\u00fc\u011f\u00fcne kar\u015f\u0131l\u0131k gelir. 100, genellikle h\u0131zl\u0131 bir t\u0131k\u0131rt\u0131ya benzer bir ses olu\u015fturacakt\u0131r. Daha b\u00fcy\u00fck bir say\u0131 kullanarak farkl\u0131 frekanstaki sesleri elde edebilirsiniz.<\/p>\n<p>Arduino&#8217;da tone() fonksiyonu ile frekans belirtmek i\u00e7in genellikle ile 65535 aras\u0131nda bir say\u0131 kullanabilirsiniz. Bu, Arduino&#8217;nun destekledi\u011fi unsigned int (16-bit) veri tipinin maksimum de\u011feridir. Ancak, insan kula\u011f\u0131n\u0131n duyabildi\u011fi frekans aral\u0131\u011f\u0131 genellikle 20 Hz ile 20 kHz aras\u0131ndad\u0131r. Bu nedenle bu s\u0131n\u0131rlar i\u00e7inde kalarak sesler olu\u015fturman\u0131z daha uygun olacakt\u0131r.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arduino kullanarak LED ve buzzer ile yapabilece\u011finiz \u00f6rnek bir uygulama: int ledPin = 13; \/\/ LED&#039;in ba\u011fl\u0131 oldu\u011fu pin int [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1470,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,1,202],"tags":[224],"class_list":["post-2445","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ino","category-genel","category-robotik","tag-arduino-buzzer-kullanimi"],"_links":{"self":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts\/2445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/comments?post=2445"}],"version-history":[{"count":3,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts\/2445\/revisions"}],"predecessor-version":[{"id":2448,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts\/2445\/revisions\/2448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/media\/1470"}],"wp:attachment":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/media?parent=2445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/categories?post=2445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/tags?post=2445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}