KY-032
KY-032 is Obstacle-detect module manufactured by Joy-IT.
- Part of the KY-032-Joy comparator family.
- Part of the KY-032-Joy comparator family.
description
1 3 Code example Arduino 3 4 Code example Raspberry Pi 4
Picture
Technical data / Short description
If the sended infrared light hits an obstacle, the light will be reflected and detected by the photodiode. The detection range can be configured by the 2 controllers.
The behaviour of this can be used for Controllers, for example to stop a robot automatically which drives straight to an obstacle.
Condition 1: There is no obstacle in front of the detector [LED on the module: Off] [Sensor signal= Digital On]
Export: 16.06.2017
Copyright by Joy-IT
- Published under CC BY-NC-SA 3.0
Page 143 of 214
KY-032 Obstacle-detect module
Condition 2: Detector detects an obstacle [LED on the module: ON] [Sensor Signal= Digital Off]
This sensor allows you to activate and deactivate the obstacle detection by manipulating the enable-pin. It is activated by default which means that the sensor is in detection mode by default. If you don't want that, you need to remove the jumper with the label "EN" and put a control signal on the enable pin.
Export: 16.06.2017
Copyright by Joy-IT
- Published under CC BY-NC-SA 3.0
Page 144 of 214
KY-032 Obstacle-detect module
Code example Arduino
This program reads the status of the sensor pin and prints it to the serial terminal if an obstacle was detected. int Sensor = 10; // Declaration of the sensor input pin void setup () {
Serial.begin(9600); // Initialization serial output pin Mode (Sensor, INPUT) ; // Initialization sensor pin } // The program reads the current status of the sensor pin // shows via serial console if the sensor detects a...