Infracrveni modul za izbjegavanje prepreka za detekciju prepreka i podešavanje udaljenosti potenciometrom.
SKU: OT2043-A54 Broj artikla: AB072 EAN: 4577243565130 Lokacija: AD05.04
Alternativa
HC-SR04 ultrazvučni senzor udaljenosti
€ 2,89
Pogledaj ovu alternativu
Ovako spoji Infracrveni modul za izbjegavanje prepreka HW-201 na Arduino UNO ili ESP32, uz primjer sketcha koji možeš odmah učitati.
Ovaj projekt koristi HW-201 infracrveni senzor za izbjegavanje prepreka za otkrivanje objekata u blizini. Kada prepreka uđe u domet, digitalni izlaz senzora prelazi na LOW, što uključuje ugrađenu LED diodu na Arduinu i ispisuje upozorenja o detekciji u Serial Monitor. Podesite onboard potenciometar na senzorskom modulu kako biste kalibrirali udaljenost detekcije.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : IR Obstacle Detection with HW-201
* Board : Arduino UNO (arduino:avr:uno)
* Parts : HW-201 Infrared Obstacle Avoidance Module
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// Pin definitions
const int sensorPin = 2;
const int ledPin = 13;
void setup() {
pinMode(sensorPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
Serial.println(F("HW-201 IR Obstacle Sensor Demo"));
Serial.println(F("Ready: Move an object in front of the sensor."));
}
void loop() {
// The HW-201 sensor outputs LOW when an obstacle is detected
int sensorState = digitalRead(sensorPin);
if (sensorState == LOW) {
digitalWrite(ledPin, HIGH);
Serial.println(F("Obstacle Detected!"));
} else {
digitalWrite(ledPin, LOW);
Serial.println(F("Clear (no obstacle)"));
}
delay(200);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Ovaj projekt čita digitalni izlaz modula HW-201 Infrared Obstacle Avoidance Module. Kada se objekt detektira unutar dometa, izlaz senzora prelazi na LOW, pali ugrađeni LED na ESP32 i ispisuje upozorenje u Serial Monitor. Možete podesiti udaljenost detekcije pomoću potenciometra na modulu.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : IR Obstacle Detection with ESP32
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : HW-201 Infrared Obstacle Avoidance Module
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// HW-201 IR Obstacle Sensor with ESP32
const int SENSOR_PIN = 4; // Connected to OUT pin of HW-201
const int LED_PIN = 2; // Onboard LED
void setup() {
Serial.begin(115200);
pinMode(SENSOR_PIN, INPUT);
pinMode(LED_PIN, OUTPUT);
Serial.println("HW-201 Obstacle Sensor Ready");
}
void loop() {
// The HW-201 output is active-LOW (LOW when an obstacle is detected)
int sensorState = digitalRead(SENSOR_PIN);
if (sensorState == LOW) {
digitalWrite(LED_PIN, HIGH);
Serial.println("Obstacle detected!");
} else {
digitalWrite(LED_PIN, LOW);
Serial.println("Path clear");
}
delay(200);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Infracrveni modul za izbjegavanje prepreka.
Daje 5V signal kada nema prepreka i 0V signal kada postoji prepreka, a zelena LED dioda svijetli. Udaljenost se može podešavati potenciometrom. Radi s 3.3V i 5V, ima crvenu LED diodu za napajanje.
Očitava udaljenost do prepreka na udaljenosti od 2-30cm i pod kutom od 35 stupnjeva pomoću infracrvenih signala. Sadrži infracrveni odašiljač i prijamnik.
Dimenzije
Duljina: 4,5cm
Širina: 1,4cm
Visina: 0,9cm

| Širina | 1,4 cm |
|---|---|
| Radni napon | 3,3V |
| Duljina | 4,5 cm |
| Visina | 0,9 cm |
| Kut | 35 stupnjeva |
| Udaljenost mjerenja | 2-30 cm |
Upravo ono što sam tražio
dobra kval
DOBRO JE
super stvar.
Infracrveni modul za izbjegavanje prepreka HW-201