JSN-SR04T-2.0 Ultrasonic sensor

Hi

Has anyone been able to get the JSN-SR04T-2.0 to work in mode 2?

I'm am not great at coding, but I've searched through so many sites looking for a way to get it to work.

The closest I have to it working is from this guy:

https://github.com/kd8bxp/jsn-sr04t-2.0-car-sensor

But when I take out the bit that changes is from mm to inches it gives me some very wrong readings, I know people have been able to get it to work manually but I'm stubborn, I want it to work with mode two or even mode 3. it makes the code a little shorter and, well I want it that way. :D

So if there is anyone that can help I would be grateful. Thanks.

Hi,

No idea what modes you are talking about. Point to more information if you want help...

terryking228:
Hi,

No idea what modes you are talking about. Point to more information if you want help…

Please find attached a pdf regarding the modes he is talking about. Personally I switched to another better waterproof sensor from here: Sealed Waterproof ultrasonic/distance small blind sensor arduino Fully Genuine | eBay which has lesser minimum distance. I have not used other modes of JSN SR04T myself, I think PWM mode is most commonly used. Just posting so that others know what modes OP is talking about.

JSN-SR04T-2.0.pdf (349 KB)

If you are using JSN-SR04T in most common PWM output mode this library will do the job - HCSR04.

  • Read distance**
  • Compensate speed of sound according to the ambient temperature
  • Pass distance thought median filter for better accuracy
  • Set maximum distance to speed up measurement

** Sensor returns 38000 if OUT OF RANGE!!!