Code for HC-SR04 sensor readings from raspberry pi

Hi,
I’m new to coding. so it’s hard to figure out how to edit sample code.I have blinked LED with Blynk already.how to receive readings of sonic senor to Blynk app.If it’s a java script it’s very helpful.
Thanks!

Welcome…

We can’t teach you how to code, that’s up to you… many other sites out the that do that. We also don’t do it for you.

A sonic sensor with Blynk can be tricky due to timing needs… not a beginner level. But you can search this forum for keywords on that topic (Ping, Ultrasonic, etc)… probably nothing for an RPi that I recall though.

Try G :eyes: gle - https://www.google.com/search?q=HC-SR04+RPi

You can also read through the Documentation and Help Center files to learn how Blynk works :wink:

http://docs.blynk.cc
http://help.blynk.cc/

that’s where I stuck on.I connected sensors and received weather they are triggered or not.and I’m bit familiar with .js and .py codes because I have done some projects,the sample codes are in c that’s why I’m looking for .js files.if I could find any example for (hc-sr04 or other) receiving data to blynk I can modify it. :blush:

@kas search this site and Google for “nodejs Blynk” and it will give you enough to get going.

As I said, this is readily available on Google… Blynk itself doesn’t read the sensor (anymoreson then with C++), it just sends the data to the App, after some other code you find and get working reads the sensor.

What little NodeJS info there is for Blynk is here… and a few mashups in this forum.