- Reduced price
![Ultrasonic sensor Module HC-SR04 Ultrasonic sensor Module HC-SR04](https://ardushop.ro/10910-large_default/ultrasonic-sensor-module-hc-sr04.jpg)
Pick up your orders anytime, hassle-free!
Orders placed by 2:00 PM are shipped the same day. Delivered within 24h!
Reliable products, worry-free!
Unused items? No questions asked!
Tensiune: 5V
Tensiune HIGH: 5V
Tensiune LOW: 0V
Unghiul senzorului: 15 grade
DIstanta detectata: 2cm - 450cm
Precizie: 0.3cm
Wiring:
Exemplu cod:
/*
* Define the pins you want to use as trigger and echo.
*/
#define ECHOPIN 2 // Pin to receive echo pulse
#define TRIGPIN 3 // Pin to send trigger pulse
/*
* setup function
* Initialize the serial line (D0 & D1) at 115200.
* Then set the pin defined to receive echo in INPUT
* and the pin to trigger to OUTPUT.
*/
void setup()
{
Serial.begin(115200);
pinMode(ECHOPIN, INPUT);
pinMode(TRIGPIN, OUTPUT);
}
/*
* loop function.
*/
void loop()
{
// Start Ranging
digitalWrite(TRIGPIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIGPIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIGPIN, LOW);
// Compute distance
float distance = pulseIn(ECHOPIN, HIGH);
distance= distance/58;
Serial.println(distance);
delay(200);
}
1x Modul senzor Ultrasonic - detector distanta HC-SR04
Your review appreciation cannot be sent
Report comment
Report sent
Your report cannot be sent
Write your review
Review sent
Your review cannot be sent
Reference: SINGZB_E18-MS1-PCB
check_circle
check_circle