SR-04 + if = Trouble

Well, I'm a noob to Arduino. I'm an automated controls tech for Exxonmobil and deal mainly with relay, gated or PLC ladder coding. However, I'm about to flip out trying to get a simple output based off a specific distance from an SR-04 ping. Using if\else statement in an attempt to achieve this and I know it's something stupid. Where's the proper place for this question? FYI, the wiring is not a problem for me. Just looking to achieve a simple high or low. Driving me nuts!

The proper place is here. The proper way to ask includes posting the code you currently have together with some detail about what it is supposed to do and what it does now. That will give us a chance to help you to get it working.

Steve

Computers always do what you tell them. A common mistake is to assume you have told it to do what you want it to do. Put lots of print statements in your code and find out what you really told it to do.

What has the title of this thread got to do with the contents?

read the sticky post HOW TO USE THIS FORUM
it can be found at the top of any forum
come back, modify your post and fix that silly subject line.
no one that has the information you want will jump and say "I can help that guy"

modify can be found at the bottom right of your post under more.....

Damn, you guys are awesome. Let me try to keep it as short as possible;
Hardware - uno, SR04 w/1m connecting trigger and echo in order to use trigger as trigger and echo. No problems there. Serial monitor reads distance fine. It's where the if/else statement comes in to play and not producing desired results which seems like it should be child's play, but has me stumped. I'm attempting to produce a HIGH OUTPUT on pin 8 when distance reads 5in or less. This is a test code for a larger sketch whose out will be sent to a 12ch low level relay module. I don't have the code I'm using with me but as soon as I get to my computer I will post it for you guys. Thanks for responding dudes, really! This is awesome y'alls community is so willing to help. And no, I'm not just looking for someone to code for me. If you do code for me I want to understand why and how it works. Thanks again. I'll be back when I can show you my code.

It seems the thread was split with an irrelevant comment!
The title went with the wrong-un - so there is an orphan with the real topic somewhere !

Grumpy_Mike:
What has the title of this thread got to do with the contents?

Title changed to something more appropriate.

lastchancename:
so there is an orphan with the real topic somewhere !

I don't understand.

As far as I can tell when the original post was split from this thread the title was not changed. (We have to do that manually.) Other than that I cannot find any trouble.