Your cart is currently empty!
Get Extra 5% off (up to ₹100) with UPI/Debit Card! The discounted price is: ₹114.00 (Original price: ₹120.00)
The RCWL-1604 Ultrasonic Sensor is a versatile and widely used component in the field of electronics and robotics. This sensor utilizes ultrasonic waves to measure the distance to an object, making it ideal for distance measurement, object detection, and obstacle avoidance. Its ease of use and reliability make it a popular choice for hobbyists, educators,…
The RCWL-1604 Ultrasonic Sensor is a versatile and widely used component in the field of electronics and robotics. This sensor utilizes ultrasonic waves to measure the distance to an object, making it ideal for distance measurement, object detection, and obstacle avoidance. Its ease of use and reliability make it a popular choice for hobbyists, educators, and professionals.
High Accuracy: Capable of measuring distances with a high degree of accuracy.
Wide Range: Detects objects within a broad range of distances.
Compact Design: Small and lightweight, making it easy to integrate into various projects.
Low Power Consumption: Efficient energy use suitable for battery-powered applications.
Simple Interface: Easy to connect and use with microcontrollers and other electronic components.
Real-Time Processing: Capable of providing immediate feedback for dynamic environments.
Distance Measurement: Accurately measures the distance between the sensor and an object, which is useful in various automation and control systems.
Obstacle Avoidance: Used in robotics to detect and avoid obstacles, ensuring smooth navigation.
Object Detection: Ideal for security systems, automated doors, and other systems requiring object presence detection.
Level Measurement: Measures liquid or material levels in containers, useful in industrial and agricultural settings.
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(6, 7, 8, 9, 10, 11); // RS, EN, D4, D5, D6, D7 | |
#define echoPin 12 // attach pin D12 Arduino to pin Echo of HC-SR04 | |
#define trigPin 13 //attach pin D13 Arduino to pin Trig of HC-SR04 | |
// defines variables | |
long duration; // variable for the duration of sound wave travel | |
int distance_cm; // variable for centimeters measurement | |
int distance_inch; // variable for inches 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“); | |
lcd.begin(16, 2); // lcd starts with resolution 16×2 | |
} //https://kitsguru.com/products/hc-sr04-ultrasonic-range-finder | |
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_cm = duration * 0.034 / 2; // Speed of sound wave divided by 2 (go and back) | |
distance_inch = duration * 0.0133 / 2; // Speed of sound wave divided by 2 (go and back) | |
// Displays the distance on the Serial Monitor | |
lcd.setCursor(0, 0); | |
lcd.print(“Distance: “); | |
lcd.print(distance_cm); | |
lcd.println(“ cm“); | |
lcd.setCursor(0, 1); | |
lcd.print(“Distance: “); | |
lcd.print(distance_inch); | |
lcd.println(“ inch“); | |
} //CREDITS : https://create.arduino.cc/projecthub/abdularbi17/ultrasonic-sensor-hc-sr04-with-arduino-tutorial-327ff6 |
Weight | 0.2 kg |
---|---|
Dimensions | 5 × 5 × 8 cm |
You must be logged in to post a review.
Enjoy 10% off your first purchase when you shop for ₹2000 or more!
Don't worry, we won't spam you.
Reviews
There are no reviews yet.