Newby question.

Hi, I'm new as a member, but Ive been playing around with Arduino for a long time. Ive got lots of stuff and I still haven't been able to get anything to click in writing code lol. I suck. My question is language based.I am pretty good with hardware side of things and do a lot of electrical work for a living, but trying to understand writing code has eaten my lunch. The biggest thing is learning and understanding how syntax works. If I want something to happen conditionally based off another input or output. Ive tried to watch tutorials and just really haven't had it "click" yet. I can upload examples all day long, but I want to know the what, why and how to programming. I'm still waiting for that "ah ha" moment where it makes sense. I know I have the aptitude and more desire than I can put into words, but I'm looking for suggestions on what tutorials to turn to, or ideas to get the basics of syntax pounded into my head so that I can actually start making things. I come humbly hoping someone can point me in the right direction.

This site helped me a lot when learning C++ (the language that Arduino uses). The Control Structures section covers the looping and decision making instructions.

The Arduino language reference can help, too.

If you have questions about how specific instructions work, ask away.

Arduino links.

For many Arduino PDF document links:
Google >>>- - - - > arduino filetype: pdf
Or
https://www.google.ca/search?q=arduino+filetype%3A+pdf&rlz=1C9BKJA_enCA739CA739&oq=arduino+filetype%3A+pdf&aqs=chrome..69i57j69i65.1385j0j7&hl=en-US&sourceid=chrome-mobile&ie=UTF-8

Watch these:

Some things to read:

https://learn.adafruit.com/category/learn-arduino

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

https://www.arduino.cc/en/Reference/HomePage

http://playground.arduino.cc/Code/AvoidDelay

http://www.gammon.com.au/forum/?id=12153

https://www.arduino.cc/en/Main/Products

https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

http://arduino-info.wikispaces.com/

http://www.gammon.com.au/motors

http://www.gammon.com.au/forum/?id=11955

.

The biggest thing is learning and understanding how syntax works. If I want something to happen conditionally based off another input or output.

Obviously everyone is different but I would have thought that this is one of the easiest things to understand. It boils down to

if (the expression or value here is true)
{
  execute the code here
}

Scootertrash:
I can upload examples all day long, but I want to know the what, why and how to programming.

A lot depends on your particular learning style. Maybe it would be a good idea to pick one of the examples you uploaded (a reasonably simple one) and study it carefully until you understand why it works the way it does. When you understand it (or as part of trying to figure it out) you can change the code a little to see the effect.

If there is something you don't understand you can post the code and ask for assistance.

...R

"but I want to know the what, why and how to programming. "

You will only learn by doing.
Go through 'all' the IDE examples, if there is anything you don’t fully understand, ask about it here.

.