Arduino Learning #3: Important Concepts
Computer science is a broad field, so is electrical engineering, and Arduino kindof requires some knowledge of both, so I wanted to offer a few important concepts for the computer science concepts.
You will not always know exactly what goes on behind the scenes. It's not fun, but it's just a fact.
What I mean by this is, you will have functions such as analogWrite()
or analogRead()
or delay()
,
and you will probably never know exactly what goes on behind the scenes. The faster you can become
comfortable looking at the documentation the better
experience you will have with learning arduino.
Functions take arguments. I haven't really mentioned this before, but functions take
arguments, separated by a comma (,
). As a general rule of thumb, functions have a set
amount of arguments, and all arguments must be provided. Order does matter.
Example
The analogWrite()
function takes two arguments, the pin number, and the output power.
// Outputs maximum power to pin 3.
analogWrite(3, 255);
// Causes errors.
analogWrite(255, 3);