loading

A professional manufacturer of measuring & testing equipment.

arduino distance sensors

Distance sensors are the most important sensors for any robot.
It is often called the \"eye\" of a robot \".
Distance sensors are very useful because we can react depending on how far we are from them or the presence of various obstacles.
There are two common techniques for amateur distance sensing: infrared sensors, such as the classic sharp infrared and ultrasonic sensors, which are often called sonar.
Now, let\'s build a distance. controlled LED!
Build a distance-
To control the LED, we need the following parts: it is easy to connect a clear IR.
Maybe that\'s why it\'s so popular.
Follow the following simple steps to connect one: the following code will read the value of the sensor, print it on the serial connection, and change the LED strength Using PWM to match the distance: first, we build-
In the LED, for the second hand analog port where we connect the sharp infrared sensor: in the settings ()
Function, we only start the serial connection.
We don\'t need to declare the LED pin as output because we use the analogy ()
Function, no declaration is required: in the loop ()
Function, the sensor of the continuously read value adopts analogRead ()function;
Then we print it on the sequence: Because the PWM takes the value between 0 and 255 and the analog reading ()
The function returns a value from 0 to 1023, and we divide the value of analogRead ()
When we use it in analogy ()
: There is a huge market for distance sensors, with hundreds of different models.
In general, we can find infrared sensors in the cheap amateur area.
Such as sharp IR-
Or ultrasonic sensors.
The infrared sensor has a very narrow induction beam.
This means that it can detect objects in tight places without interfering with other objects.
However, if an object is too thin or has holes in its body, the sensor beam may go through it and give the wrong reading.
Ultrasonic sensors commonly referred to as sonar use sounds higher than normal hearing frequencies to detect distances.
It does this by sending out a short sound pulse and waiting for it to return.
It measures the time it takes for the sound to propagate, bounce the object, and then return the sensor.
Because the speed of the sound is known, the total time returned by the sound depends on the distance from the object.
This creates a very wide induction beam.
It is useful in many applications, especially when we need to detect large and complex objects.
However, if we have an object in two ranges, the wide beam produces interference.
It will always detect a closer one.
One important thing to keep in mind is that the infrared sensor depends on the color of the object being measured, while sonar, in addition to the shape and distance of the object, is generally not affected by the parameters.
More topics about sensors such as noise reduction, accelerometer or GPS can be found in my Arduino development manual.

GET IN TOUCH WITH Us
recommended articles
200 FAQs WHAT' S NEW APPLICATION
How to keep the hydraulic universal testing machine clean



Hydraulic universal testing machines have very high accuracy requirements.
Connection of hydraulic system of tensile testing machine



The hydraulic system is the power drive mechanism of the tensile testing machine.
Application of electronic universal testing machine in automobile industry



The specific application of the electronic universal testing machine in the automobile manufacturing process: The electronic universal testing machine needs to be used for automobile parts.
Wave soldering workflow



Wave soldering refers to the molten solder (lead-tin alloy), sprayed by electric pump or electromagnetic pump into the solder wave required by the design, can also be formed by injecting nitrogen into the solder pool, so that it is pre-loaded The printed board of the component realizes the soft soldering of the mechanical and electrical connection between the solder end or the pin of the component and the pad of the printed board through the solder wave.
Protection of frequency converter of hydraulic universal testing machine



The frequency converter is a power control equipment that uses frequency conversion technology and microelectronics technology to control AC motors by changing the frequency of the motor's working power supply.
Common failures of electronic universal testing machine



Electronic universal testing machine is a necessary equipment to control the quality of products.
Calibration method of electronic universal testing machine



The calibration operation of the electronic universal testing machine is still relatively unfamiliar to friends who use it for the first time.
Brief introduction of selective wave soldering defects and prevention



Selective wave soldering defects and their prevention.
Some precautions when using the testing machine



Testing machine, broadly speaking, is an instrument that verifies the quality or performance of a product or material according to the design requirements before it is put into use.
How to measure the tensile force of the testing machine



The tensile force is not an accurate value after being measured by the testing machine, and subsequent calculations are required to get the desired value.
no data

  Tel: 0086-0769-2318 4144

  Mobile: 0086-137 2828 8444

no data
CONTACT US

Copyright © 2025 Sinowon | All Rights Reserved.

Customer service
detect