Skip to main content

Questions tagged [ultrasonics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
41 views

LCD display spits out gibberish when connected to Arduino R4 WiFi and ultrasonic sensor [closed]

Here is my code. #include <LiquidCrystal.h> // Define LCD pin connections const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); // Define ...
ShivamHegadi's user avatar
1 vote
0 answers
83 views

Inaccurate and changed results with ultrasonic sensor

I have an issue using an ultrasonic sensor. The problem is that when I connect the ultrasonic sensor to my Arduino Nano, it always gives some random values, usually 130 cm, I don't know why. I bought ...
hasan darwish's user avatar
-1 votes
1 answer
52 views

Problem with some sensors but not with servos

I use a lot Arduino Uno, but in this case, I have some BQ ZUM BT-328 boards, which are based on Arduino BT. The problem with some of BQ ZUM BT-328 boards is that the ultrasonic sensor (HC-SR04) is not ...
CGG's user avatar
  • 99
0 votes
1 answer
125 views

Single Method for 2 Ultrasonic Sensor is not working as expected

So I have created a method to read and return Ultrasonic Sensor Data. I have 2 Ultrasonic Sensors. Below is my code.    // Ultrasonic Pins    #define T1 2 &...
Ansari Aquib's user avatar
1 vote
1 answer
690 views

Motor with ultrasonic sensor

I am new to programming so bear with me. I am writing a simple code to control a motor such that the motor will turn at full speed as long as the sensor does not detect an object within 5" of the ...
Pilot Ken's user avatar
1 vote
0 answers
77 views

Controlling Bluetooth voice-controlled car with ultrasonic sensor

I am trying to use an ultrasonic sensor to stop a tiny voice-controlled car but I can't get it to work. once the motor starts moving it doesn't stop I'm trying to make the car stop moving even though ...
brian's user avatar
  • 11
4 votes
2 answers
906 views

Controlling a 5V fan and ultrasonic fogger with an arduino - do I need an external power supply?

I know the whole controlling a fan with an arduino thing is getting old, but somehow I still don't get it to work. Tried to answer it based on other questions but I am too much of a newbie to ...
crabdance's user avatar
1 vote
0 answers
77 views

I want my LED's to turn on for 5 sec when the Ultrasonic Sensor Activated

const int Trigger = 6; const int Echo = 7; const int LEDpin1 = 4; const int LEDpin2 = 5; const int Parameter = 400; float Time; void setup() { Serial.begin(9600); pinMode(Trigger, OUTPUT); pinMode(...
Leonardo Morales's user avatar
1 vote
1 answer
89 views

can differential drive work together with ultrasonic sensor?

I've written a sketch to drive a differential drive system, specifically - to be able to drive strait. This does work. So I am trying to add the ability to stop when the path is blocked using US ...
יחזקאל הירשהורן's user avatar
3 votes
0 answers
180 views

Can't stop the 3 pin active buzzer

I was simply trying to program a buzzer with the ultrasonic HC SR04 and 128x64 OLED display. The buzzer is an active buzzer (3 pin) on a small board. The problem is that, once on, it never stops ...
Bukaida's user avatar
  • 131
1 vote
2 answers
496 views

Avoid using delay with the HR-S04 ultrasonic sensor

How can I measure the distance of an HR-S04 ultrasonic sensor with millis and micros?
alessandromrc's user avatar
2 votes
1 answer
427 views

Arduino (line follower + ultrasonic sensor + servomotor)

I am making a line follower car that follows the line when push button is pressed. And by using ultrasonic sensor I want the car to stop when object ahead distance is closer than 100 and then make ...
PGI's user avatar
  • 21
1 vote
0 answers
83 views

Does natural outdoors wind affect the readings of an ultrasonic sensor significantly?

I am thinking of using an ultrasonic sensor outdoors, and am wondering if the presence of wind (say up to 20km/h) would significantly impact the accuracy of the readings, or would this not be a large ...
Eric's user avatar
  • 41
0 votes
1 answer
72 views

How to make ultrasonic and light sensors detect whether a person moving in or out [closed]

I am trying to make a circuit that will be used for turning on a light whenever there are 1 or more people in a room. I need to add to a variable counter when someone enters and subtract when someone ...
NinePlusTenEqualsTwentyOne's user avatar
1 vote
2 answers
381 views

Arduino code not working properly (Please Help)

I am having some trouble getting my board to perform the function I want it to perform. This is a project I have due in a few days, and I have hit a wall I just can't seem to get past. Now, I will say ...
Geraldo's user avatar
  • 13
2 votes
0 answers
52 views

Issues with Polytone Library?

I'm building a device that uses two ultrasonic sensors to detect objects and provide audio feedback in the form of beeps that get faster the closer an object is. I have two speakers, one for each ...
Kaytee's user avatar
  • 21
1 vote
0 answers
48 views

Problem using sequential loop

So I have created this project to have an LED blinking at a constant speed whenever the program is running. The first LED (green) will blink faster and faster the closer an object gets to the sensor. ...
willbill's user avatar
1 vote
0 answers
118 views

Arduino Ultrasonic Sensor AnalogRead

i have an ultrasonic sensor. The sensor normally works stably. But I have to carry the data cables of this sensor for 50 meters and take reading. When i do this, when I extend the cable, the values I ...
Enes Orhan's user avatar
2 votes
0 answers
29 views

When is following code is dumped into Arduino NANO the output is not as expected after few trials

I'm a beginner of Arduino programming, when I dumped the following code into Arduino NANO board, at the first the output is as expected. But After few trials the 16*2 LCD display is getting off and ...
Swathi's user avatar
  • 21
1 vote
1 answer
1k views

How to get an angle from two ultrasonic sensors

I am building a chair for a special 4 year-old with cerebral palsy, I thought it would be a good idea to add two distance sensors on each arm of the chair to measure the angle at which he presses ...
Seaver Olson's user avatar
2 votes
2 answers
8k views

sro4m-2 waterproof ultrasonic sensor

I bought this waterproof ultrasonic sensor about 5 of them with the part number SR04M-2 Written on the PCB silkscreen Which is different from the usual SR04t-0.2, they are just not working, I don't ...
Jephtah Jephtah's user avatar
0 votes
1 answer
28 views

Whatever components we connect to the Arduino, their grounds and 5v pin connection must be the same?

I am trying to connect different types of sensors & motors to the Arduino should I make their grounds and 5v pins on the same connection.
Amit Nikhade's user avatar
0 votes
2 answers
5k views

UltraSonic Sensor with an ESP-01 Standalone

I'm trying to build a cheap device to measure water level in a tank using HC-SR04 sensor and ESP-01 which send the data to MQTT topic. I used the same code with ESP-E12 which works just fine. As I'm ...
motion channel's user avatar
1 vote
0 answers
2k views

Data Fluctuation with AJ-SR04M Sensor

I'm working on water level detector using lolin nodemcu v3 and AJ-SR04M Sensor, a water proof ultrasonic sensor. It is working fine at close distance less than one meter or so. However for long ...
motion channel's user avatar
0 votes
1 answer
165 views

working with ultrasonic sensors

I have a little problem dealing with ultrasonic sensor I want a simple thing , when the sensor read High pulse then after it low pulse , turns on the led so I try to make it with a 5cm distance and a ...
Majd Ramadan's user avatar
3 votes
2 answers
1k views

Is an Ultrasonic Sensor or Infrared Sensor better for measuring distance (to/from a human body)?

I'm trying to make a sensor to detect that a person is within 50cm to trigger a function. But when I use the HR-SR04 sensor, it works accurately on flat surfaces (e.g. walls, books) with a margin of ...
YJJcoolcool's user avatar
1 vote
0 answers
45 views

why this unexpected behaviour shows when i use the following code to send the data from the ultrasonic distance sensor to firebase

I am using nodeMCU esp8266 wifi module to send the data received by the ultrasonic distance sensor to the firebase. here is my code: #include <ArduinoJson.h> #include <ESP8266WiFi.h> #...
Tank's user avatar
  • 13