Hi all,
I bought 2 A0221AU UART ultrasonic distance sensors.
I tried both with the official arduino code on an Arduino Uno R3, checked the code several times, ... but the sensors (both were tested repeatedly) does not measure the correct distance.
Most of the time, the same distance is given (value around 1467mm), and at random moments other distances are given but never the correct distance.
I ordered both via Amazon, in reality I ordered the A02yyuw but they delivered the A0221AU instead.
Did anyone over here have the same problem and has a solution?
Thanks
G.
Read the forum guidelines to see how to properly ask a question and some good information on making a good post. You will get faster and better help if you post all your code as requested by the forum guidelines.
Hello noiasca,
Thanks for the link.
I have used that example as well, but the A0221AU sensors I have OR do not work with this code OR do not seem to work properly at all.
They both give a distance of about 1460mm - whatever I do with the sensor itself - and then for no reason start to give more realistic measurements for a while, but never a very precise measurement.
I wonder if the A0221AU sensor and the A02YYUW are exactly the same, or if there are some differences, but I cannot find any information on this question.
thanks for helping and regards,
G.
Hi b707,
I added the code in 'code tags' in #7.
Sorry for my mistake, it's the first time that I'm using the forum to get some help.
So thanks for your patience and the guidance !
regards
G.
Just letting you re-re-know that the link in Post #2 points you to one place that lets you re-know the procedure to post code in a topic that you agreed to when you signed up for this account. You got it right on the fourth try. As you learn Arduino, programming and electronics (and a bicycle or a swing set), instructions are made to be followed the first time... or things don't happen... or bad things do happen. Be well.
Erratic behavior could be due to a wiring problem, poorly soldered joints, power problem etc. Please post a wiring diagram, a photo of your setup and links to the product pages for the parts.