1 Nisan 2013 Pazartesi

Arduino Esplora Mikrofon (Ses Sensörü)

Hamza Öztaş Share:
Image Hosted by ImageShack.us
Image Hosted by ImageShack.us
Code;


#include <Esplora.h>
void setup() {
  Serial.begin(9600);
}
void loop() {

    int loudness = Esplora.readMicrophone();
    int brightness = map(loudness, 0, 1023, 0, 255);
    Esplora.writeGreen(brightness);
    // print the microphone levels and the LED levels (to see what's going on):
    Serial.print("sound level: ");
    Serial.print(loudness);
    Serial.print(" Green brightness: ");
    Serial.println(brightness);
    delay(10);
}

Tarafından Yayınlandı >> Hamza Öztaş

Hamza Öztaş'ı google plus'ta takip etmek için Google'a tıklayın;
Google+.

0 yorum:

Get Updates in your Email
Complete the form below, and we'll send you our best of articles.

İletişim

© >> |
TOP