I have another project I have to do.
Ultra sonic distance with beeps that warn distance (have this code and schematics for this) but the other function I need is when it detects a very close distance it will trigger a relay. can anyone help here.
40cm to 10cm beeping, then from 10cm to 2cm beeping and trigger relay in this range. (has to be a relay for switching a load)
Mike
Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.
Continued cross posting could result in a time out from the forum.
Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.
MikeMCA:
can anyone help here.
Depends on how you wrote the code so far. If your existing beeping is blocking (written more like "blink" than "blink without delay") then it may be difficult to further interrogate the distance to see if it's closer than 10 to turn the relay on.
I would probably write it to use the newping library and call for the distance delaylessly (according to whatever the minimum time between pings is normal, I can't recall the value right now, some 30ms or something?), then call a "beep without delay" function if distance is under 40. That will make it easy to further check the distance and turn on the relay if distance is under 10.
That makes sense, i used the code i have from fritz, and wired up a bread board, no joy on the LCD not a flicker, today will have to look at it again its an 21c 16x2 then pinouts are not the same as my old one.
Will poss have to look for another design
If you can suggest one that would be great
mike.
I'm not sure where this ....
MikeMCA:
That makes sense, i used the code i have from fritz, and wired up a bread board, no joy on the LCD not a flicker, today will have to look at it again its an 21c 16x2 then pinouts are not the same as my old one.
Will poss have to look for another design
If you can suggest one that would be great
mike.
.... fits into the question about ultrasonic and buzzer and relay?
But whatever it is and whatever it does, why don't you post...
the code [you] have from fritz
...as a starting point for help?
hi i will soon as i get the code right and a few things sorted
hi i will soon as i get the code right and a few things sorted