Relative Content

Tag Archive for arduinodistance

Regarding the distance sensor using an LED infrared emitter and an IR photodiode

I want to measure the distance to an obstacle using an LED infrared emitter and an IR photodiode, but it is not working correctly.
I am using an Arduino microcontroller, and I purchased the sensor from Temu.
Link: https://www.temu.com/goods.html?_bg_fs=1&goods_id=601099533870597&sku_id=17592289886431&_x_sessn_id=yv1ec4mxm0&refer_page_name=bgt_order_detail&refer_page_id=10045_1716208253115_3s0h0vglu9&refer_page_sn=10045
The wiring is as shown in the photo.
The program is as follows.
enter image description here