microsoft / MXDial-IoT-Sample

MX Dial
MIT License
39 stars 23 forks source link

MXDeviceDemo.ino Noise level detector #6

Open SibeeshVenu opened 5 years ago

SibeeshVenu commented 5 years ago

In the MXDeviceDemo.ino file, I see a comment as "Check if the user wants to record - this is temp until we get the sound working properly".

// Check if user want to record - this is temp until we get the sound working properly if (digitalRead(USER_BUTTON_B) == LOW && messageReceived == false) { Screen.clean(); Screen.print(1, "Start recording"); do { // Nothing - just imitate recording } while (digitalRead(USER_BUTTON_B) == LOW); soundRecorded = true; } I am looking for a solution/device code which detect the noise in a period of time, like we do for temperature, humidity etc, without pressing the button B. Is it possible? Do we have any such solution?