NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Arduino ile ses kontrollü RGB LED yakma için bir ses sensörü ve RGB LED'e ihtiyacınız olacak. Aşağıda temel bir örnek veriyorum:

**Malzemeler**:
- Arduino (Uno, Nano, Mega vb.)
- RGB LED
- Ses sensörü (örn. KY-038 veya benzeri)
- Dirençler (RGB LED için)
- Breadboard ve jumper kablolar

**Bağlantı**:
1. Ses sensörünün `VCC`'sını Arduino'nun `5V`'sına, `GND`'sını Arduino'nun `GND`'sına bağlayın.
2. Ses sensörünün analog veya dijital çıkışını bir Arduino pinine bağlayın.
3. RGB LED'in her bir katodunu (Kırmızı, Yeşil, Mavi) bir dirence bağlayın. Ardından her direncin diğer ucunu bir Arduino dijital pinine bağlayın. RGB LED'in anotunu (orta bacak) Arduino'nun `GND`'sına bağlayın.

**Kod**:
```cpp
int sesSensorPin = A0; // Ses sensörü için pin tanımlaması
int sesDegeri = 0; // Ses değerini saklamak için değişken

int kirmiziPin = 9; // Kırmızı LED pin tanımlaması
int yesilPin = 10; // Yeşil LED pin tanımlaması
int maviPin = 11; // Mavi LED pin tanımlaması

void setup() {
pinMode(sesSensorPin, INPUT);
pinMode(kirmiziPin, OUTPUT);
pinMode(yesilPin, OUTPUT);
pinMode(maviPin, OUTPUT);
Serial.begin(9600); // Seri iletişim başlatma
}

void loop() {
sesDegeri = analogRead(sesSensorPin); // Ses sensöründen değer okuma
Serial.println(sesDegeri); // Seri porttan ses değerini yazdırma

if(sesDegeri > 500) { // Eğer ses değeri belirli bir eşiği geçerse
digitalWrite(kirmiziPin, HIGH); // Kırmızı LED'i yak
} else {
digitalWrite(kirmiziPin, LOW); // Kırmızı LED'i söndür
}

delay(100); // 100 ms bekleme
}
```

Bu basit örnek, ses sensöründen gelen değeri ölçer ve belirli bir eşiği aşarsa kırmızı LED'i yakar. İhtiyacınıza göre ses seviyesine göre farklı renklerde LED yakma veya başka işlemler ekleyebilirsiniz.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.