Questions tagged [arduino-ultra-sonic]

85 questions
0
votes
1 answer

Ultra sonic sensor always shows same distance

I tried to bulid up an ultra sonic sensor and followed this tutorial: https://www.thestrongestlink.nl/2020/05/31/ultrasonic-sensor-for-the-jetbot/#comment-90 In the picture below you can see my wiring. I uploaded the code from the tutorial to my…
lkrss
  • 57
  • 1
  • 9
0
votes
1 answer

how to get input value from ultrasonic sensor on copper web application (coap protocol)

i can't use 'GET' in copper.I know that ultrasonic sensors can't be set like lights (binary data). but I just want to get a description of the if parameter I've made if (jarak < 50) { Serial.println ("jarak Aman "); } else { …
0
votes
2 answers

Change a variable to text for serial monitor (Arduino Uno)

I'm using an HC-SR04 Ultrasonic Sensor that displays distance, there's two if statements, if it's below 0 it comes out as 0 (that part works as intended), if it's over 4 meters (distance variable is a centimeter) it is supposed to say "Out of…
0
votes
1 answer

Detection of Stairs using Ultrasonic Sensor - Using just sensors

I am working on a project for blind navigation wherein Im planning to place ultrasonic sensors like two each on the shoe, four on the vest( the person will be wearing) and one on his/her cap. In this scenario, how can I detect upstairs and…
newbie99
  • 53
  • 1
  • 6
0
votes
1 answer

Why does the green light light up when needed?

So here's what I am trying to achieve when the ultrasonic sensor detects a distance less than a certain amount then the light should turn green allowing the traffic to move Here's the code int pir = 2; int rojo = 12; int amarillo = 11; int verde =…
0
votes
2 answers

Stopping turning servo motor after an obstacle is detected by ultrasonic sensor with Arduino

I want to stop a servo motor which turns continuously until an obstacle is detected by ultrasonic sensor. For instance, I want the servo motor to stop when the obstacle is within 5 cm of the ultrasonic sensor. If there is no obstacle, servo motor…
Emma
  • 11
  • 1
0
votes
1 answer

Python RC Car Ultrasonic sensor blocking fast remote commands

I've made a RC car and recently I just got a kit that has all the stuff I need to add collision warnings, the problem is, is that it blocks codes and it will go forward with a lot of lag from the controller. I tried adding a thread to it but it…
0
votes
1 answer

Program loops even after break

This is the code: def check_ultra(): global arduinoSerialData,y,i y=None i=None while True: if arduinoSerialData.inWaiting() > 1: myData = arduinoSerialData.readline() myData = str(myData) …
strilz
  • 63
  • 7
0
votes
0 answers

Unable to find the distance using HC-SR04 ultrasonic sensor

I am trying to find the distance to a nearby object using an HC SR04 ultrasonic sensor. I followed the tutorial from the below link: HC-SR04 Ultrasonic Range Sensor on the Raspberry Pi I replicated all the instructions as given. I ran into a problem…
Akhil2511
  • 1
  • 2
0
votes
1 answer

Ultrasonic sensors

Now i am using 2 ultrasonic sensors but i found that they become unstable outdoors and give random readings .....although they act normally inside a room .....how can i solve this problem??? That is the code it seems like the off Sensor always…
0
votes
1 answer

How to select the right I/O extender for ESP8266

I have an ESP8266 to which I want to connect a few ultrasonic sensors. I need to poll them every second in order to calculate the distance they measure. Because ESP8266 doesn't have many digital pins, I have to use an I/O extender, but I don't know…
0
votes
1 answer

Blynk notification with ultrasonic sensor

This is my code which actually send blynk notification when distance is greater than 150. but its output is very weird. It again and again run setup function instead of only once. The esp8266 device goes online and offline and then again online due…
0
votes
1 answer

How to communicate with HM-19 BLE Module and scan using ultrasonic sensor

I am working on my senior project for school, and part of what I need to do is use an HM-19 Bluetooth 5.0 module to connect to another Bluetooth 5.0 module and establish a master slave connection. I can do that just fine, but when I include the code…
0
votes
0 answers

Buzzer Continuously beep HIGH then LOW

In my project i am using GSM900A mini, GPS Neo 6m, Ultrasonic Sensor and Buzzer. Problem is I have two sketch, 1)**For GSM and GPS and **2) for Ultrasonic and Buzzer, when i use both sketch separately working fine but when i combine buzzer start…
Shubham Sahu
  • 1,963
  • 1
  • 17
  • 34
0
votes
1 answer

Troubleshooting Python code for a ultrasonic sensor attached to Raspberry Pi

I'm trying to write a program that displays the output of a ultrasonic sensor attached to a Pi 3B+. The code 'hangs' by which I mean that the display of output suddenly stops and the program doesnt respond anymore. Can someone help me point out the…
LeafTeaNeko
  • 113
  • 1
  • 13