Target spraying with ultrasonic sensor

Hello all,

I am trying to target a room to spray using either ultrasonic sensors or ydlidar g4. Can someone please help me with the code and circuit? Thank you all very much. I appreciate every help.

rchow012:
I am trying to target a room to spray

What exactly is involved when you “target a room to spray”? The phrase means nothing to me. Spray what, where, how?

What information are you expecting your devices to provide to you to help in this ambition?

Steve

I mean targeting an object. For instance, I want my robot to spray at the chair or table when it sees a chair/ table in the room. I will really appreciate your help.

The basic function sounds like what every obstacle avoidance robot does...detect something in front of it and perform some action. If you Google "Arduino obstacle avoidance" you'll find plenty of examples including code. Just replace the "go round the obstacle" action with your "spray the object" action and you've done what you described so far.

But I can't help but think that there may be more to it than you've said. E.g. does it just spray everything it meets. If not how do you expect it to tell which objects, like a chair or table, it should spray and which objects, like a wall,a door or perhaps a person, it shouldn't spray? Is it, like a paint sprayer, supposed to spray the whole of the object from side to side, top to bottom or just spray at the first point it sees?

A better description of what your project is really intended to do would probably help.

Steve

Hello,

I am planning to use machine learning so that the robot knows what to spray.

Good luck.

Steve

rchow012:
Hello,

I am planning to use machine learning so that the robot knows what to spray.

Perhaps you should first decide if YOU can use ultrasonic sensor to determine the difference between a table and a chair and a person and a per dog.

Paul

rchow012:
Hello,

I am planning to use machine learning so that the robot knows what to spray.

So this isn’t an Arduino question. Is that what you’re saying?

I am planning to use machine learning so that the robot knows what to spray.

Fascinating! How will the robot be informed that it just sprayed the wrong item?

jremington:
Fascinating! How will the robot be informed that it just sprayed the wrong item?

Or how will he reward the robot for getting it correct?

Paul