Lesson 2 - Creating A Series and Parallel Circuit
Lesson 2 - Creating A Series and Parallel Circuit
AND PARALLEL
CIRCUIT
PROGRAM
MING
The Arduino’s IDE programs
are similar to the C
language. Many C principles
are used in programming
the Arduino, if you have no
background in C
programming language you
don’t need to worry that
much as the proficiency
levels required is just basic.
COMMENT
Comments are how you
explain or inform people
reading your sketch on
what it does. It is a good
practice to put comment on
your sketches, in case you
forgot how the sketch
functions.
• For single line comments,
just add two forward
slashes(//)and this line will
be ignored by the compiler.
• For more than one line
comment use /* at the
start of the comment and
end it with */.
VARIABLES
Variables are used to label and store a piece of data. This
provides us simple way to access, save and change information.
You can declare a variable in different parts of the sketch
depending on where do you want to use it, but often it is placed
at the first few lines. Names of variables must be starting with a
character (does not matter if it is in Capital letters or small
letters) and not with an integer. There are many different types
of a variable and some of the most common variable types are
listed below:
• int: a 16-bit integer. Storing integer means storing
whole numbers. It can hold positive and negative
whole numbers ranging from -32768 to 32767.