Hc Sr04 Ultrasonic Range Finder
Rs. 47.00 Rs. 55.00
- Product Code: SEN-ULTRA
- SKU -
- Availability: In Stock
- Price in reward points: 1
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS: | |
Model | HC-SR04 |
Operating Voltage(VDC) | 5 OR 3.3V |
Average Current Consumption (mA) | 2 |
Frequency(Hz) | 40000 |
Sensing Angle | 15° |
Max. Sensing Distance (cm) | 450 |
Sensor Cover Dia. (mm) | 16 |
OVERVIEW: | |
Affordable Price | |
Operating Voltage | 5 V OR 3.3V |
Sonar Sensing Range | 2-400 cm |
Max. Sensing Range | 450 cm |
Frequency | 40 kHz |
PACKAGE INCLUDES:
1 PCS x Hc Sr04 Ultrasonic Range Finder
//SOURCE CODE TAKEN FROM BELOW LINK
//https://create.arduino.cc/projecthub/abdularbi17/ultrasonic-sensor-hc-sr04-with-arduino-tutorial-327ff6
// ---------------------------------------------------------------- //
// Arduino Ultrasoninc Sensor HC-SR04
// Re-writed by Arbi Abdul Jabbaar
// Using Arduino IDE 1.8.7
// Using HC-SR04 Module
// Tested on 17 September 2019
// ---------------------------------------------------------------- //
#define echoPin 2 // attach pin D2 Arduino to pin Echo of HC-SR04
#define trigPin 3 //attach pin D3 Arduino to pin Trig of HC-SR04
// defines variables
long duration; // variable for the duration of sound wave travel
int distance; // variable for the distance measurement
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an OUTPUT
pinMode(echoPin, INPUT); // Sets the echoPin as an INPUT
Serial.begin(9600); // // Serial Communication is starting with 9600 of baudrate speed
Serial.println("Ultrasonic Sensor HC-SR04 Test"); // print some text in Serial Monitor
Serial.println("with Arduino UNO R3");
}
void loop() {
// Clears the trigPin condition
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin HIGH (ACTIVE) for 10 microseconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance = duration * 0.034 / 2; // Speed of sound wave divided by 2 (go and back)
// Displays the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
}
15 days