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
const int TRIG_PIN = 4; | |
const int ECHO_PIN = 5; | |
const int BUZZER_PIN = 3; | |
const int DISTANCE_THRESHOLD = 30; | |
// variables will change: | |
float duration_us, distance_cm; | |
void setup() { | |
Serial.begin (9600); |