Jsn - sr20 - y1

who can help me with the code for this sensor JSN - SR20 - Y1/I can't find the code if someone helps, I will be grateful

I moved your topic to an appropriate forum category @levardu3242.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Did you try? Code and more.

Looking at the JSN-SR20-Y1 datasheet, the sensor has 6 different modes of operation. These are selected by fitting different value resistors to a set of pads on the PCB.

If you leave the sensor in mode 0 (the default setting), then it will behave in the same way as the ubiquitous HC-SR04 ultrasonic sensor.

Have a look at this tutorial for details on how to use the HC-SR04:
lastminuteengineers.com/arduino-sr04-ultrasonic-sensor-tutorial/