Questions tagged [ultrasonics]
The ultrasonics tag has no summary.
28 questions
0
votes
1
answer
95
views
Ultrasonic sensor showing random readings
I am using a HC-SR04 ultrasonic sensor to measure the distance using an Arduino Uno. When I run this code which is worked perfectly in the previous, it only shows just random readings in the serial ...
0
votes
0
answers
96
views
The control function is not sending out correct values
#include <MIDI.h>
int scale = A4;
int oct = A2;
int potval, octval,octval2=0;
int newnote, prevnote = -1;
int newpotval,prepotval=-1,potval2=0;
int trigr = 7; // Ultrasonic right
int echor = ...
1
vote
0
answers
242
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 ...
-1
votes
1
answer
64
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 ...
0
votes
1
answer
166
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
&...
1
vote
1
answer
1k
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 ...
1
vote
0
answers
96
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 ...
4
votes
2
answers
1k
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 ...
1
vote
0
answers
99
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(...
1
vote
1
answer
112
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 ...
4
votes
1
answer
227
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 ...
1
vote
2
answers
622
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?
2
votes
1
answer
572
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 ...
1
vote
0
answers
127
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 ...
0
votes
1
answer
107
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 ...