This project is about the interfacing of E30 sound sensor module with Arduino. This module can be interfaced with other microcontrollers and processors as well. I tried to show the demonstration of DRS Ultra-edge system and mechanism through the interfacing of this module.
Circuit Diagram:The circuit diagram of E30 Sensor and Arduino UNO R3
const int OUT_PIN = 8; //The sensor's outpin is attached at Digital 8
const int SAMPLE_TIME = 10;
unsigned long millisCurrent;
unsigned long millisLast = 0;
unsigned long millisElapsed = 0;
int sampleBufferValue = 0;
void setup() {
Serial.begin(9600); //Signifies sensor streaming 9600 bits of data/second
}
void loop() {
millisCurrent = millis();
millisElapsed = millisCurrent - millisLast;
if (digitalRead(OUT_PIN) == LOW) {
sampleBufferValue++;
}
if (millisElapsed > SAMPLE_TIME) {
Serial.println(sampleBufferValue);
sampleBufferValue = 0;
millisLast = millisCurrent;
}
}
0 projects • 6 followers
A motivated Computer Scientist & Engineer with years of experience over IoT, Robotic Systems, Machine Learning Algorithms and Software.
Comments
Please log in or sign up to comment.