What is the proper if statement to make the servo goes 180 and activates the red LED when the distance is less than 50 and goes zero and activates th

shift resistors a bit higher. VCC for servo and SR04. GND for servo.

VCC and SR04 to power, is this what you mean?

VCC is 5 Volt, power for devices and some elements. normally red color
GND, (ground), common wire to any devices and elements. every signal is referenced to GND. black wire.

1 Like

Should I remove the turquoise wiring?

change color to show which wire it is.

Should I remove the red ones?


1 Like

What do you think?

1 Like

@rafaelleduarte

You can go on for weeks trying always new variations hoping for having luck to find the right wiring by accident.

But I suggest something very different:
Take 2 to 4 hours of time to really learn the basics of electronics.

lesson zero:
never never NEVER connect Vcc and GND directly to each other!"
This is a shortcut that will immidiately destroy real world electronics

lesson one:
learn how breadboards are wired internally

lesson two
work through this tutorial

best regards Stefan

1 Like

Does this schematic view look less gross than the previous ones?

I don't know what a "DISTSRV" is, but it doesn't have a ground connection.

How many attempts do you need to understand:

nobody will ever post a correct circuit for you.
All that happends is trying to guide you to learn it yourself.

tips how to improve your posting style

Have studied the lessons of post #50? If yes, then are you ready to sit for quiz?

i have done, twice

So much ignorance and unwillingness to learn is what I call low-level-trolling

tips how to improve your posting style

Me personal I will mute the thread and the user

That's from #52, but the later diagram in #53 still has no ground for that component:

image

And #49 pointed out this:

image

... which is still like that in #53:

image

1 Like

Sometimes the manual of instrutions is not enough or does help very poorly! This year I programmed a simple bank office app utilising Eclipse IDE (JAVA) with no direct contact with other programmers, because this sort of thing is massively posted on StackOverflow and other IT websites. Apart from this, recently I programmed a simple, functional and aesthetically pleasing game for uni work having received little (and massively important) help of experienced programmers in the forum of Processing, because each of my load of questions was posted there before by other students. I know how to use Google! I (dumbly) thought that it would be the same regarding Arduino, but LOL it is not! Internet of things is my current discipline at university and it has been very difficult, because Arduino projects vary expressively across the globe and programming electronic bits is an entire new thing for me. I have searched for water level sensor and all the key words associated with it and found no proper answers for my case! As I pointed previously, some projects on Tinkercad that have the exact electronic components that mine should have do not work properly when I click the simulation button, and I'm sure the projects do not work as expected. If the servo works, the two LEDs don't!

I came here with my questions not being too specific, because I'm fluent in English but not too fluent when it comes to the vocabulary that experienced people in the field of electronics use.

I'm working upon this specific part of the circuit! I have been changing the wiring in order to see if I do the correct thing.