This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> //include the library for the servo motor | |
int MIC = A0; //sound detect component connected to A0 leg | |
boolean toggle = false; //recording the initial version of the toggle | |
int micVal; //record the detected volume | |
Servo servo; //set the Servo motor's name as servo | |
unsigned long current = 0; //record the current time stamp | |
unsigned long last = 0; //record the last time stamp |