- Reduced price
- 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
- Services
- Home
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: MSDERM_BMS_4S_30A
Mayitr 4S 14.8V 30A 18650 Li-ion Lithium Battery Cell BMS PCB Protection Board Balance Over Charge Protection Board
Reference: MSJBND_LM-red-line
650nm 5mW Red Laser Line Module Glass Lens
Reference: ARTDTW_2x18650_POWER_BANK
Two Voltage 18650 Lithium Battery Shield V8 Mobile Power Expansion Board Module 5V/3A 3V/1A Micro USB For Arduino ESP32 ESP8266
Reference: VHLSVG_DICE_DIY
Lucky Rotary Suite Electronic Suite Turntable CD4017 NE555 Self LED Light Kits Production Parts Module 3V 5V Pulse Generator DIY
Reference: SZHXBY_2050231
Brand: micro:bit