- There are no more items in your cart
- Shipping
- Total lei0.00
- Electronics
- 3D Printing
- Storage boxes
- CNC
- Stock Clearance
- Fun socks
- Documentation / books
- Gift Cards
Ultrasonic sensor Module HC-SR04
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!
Descrierea produsului:
Tensiune: 5V
Tensiune HIGH: 5V
Tensiune LOW: 0V
Unghiul senzorului: 15 grade
DIstanta detectata: 2cm - 450cm
Precizie: 0.3cm
Exemplu de conectare:
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);
}
Continutul coletului:
1x Modul senzor Ultrasonic - detector distanta HC-SR04
Reference: KIT-BB830
KIT Breadboard830 + 65xjumper wires + power supply 3.3/5V
Reference: HMBFZV_sensor_shieldv5
Sensor Shield v5.0 Expansion Board for Arduino
Reference: WATJRZ_AAA
Brand: GroundStudio