Arduino Programing Note
Arduino Programing Note
Arduino coding
Level 5
What is Arduino
• Arduino IDE (Integrated Development
Environment) is an essential which makes the
task of uploading code on Arduino boards, an
easy task. Instead of writing them at the
assembly level, the IDEs make it convenient
and the codes are written in high-level
languages like C and C++.
• Arduino code is based on C++, a high-level
programming language
What is Arduino?
• Microcontroller: The microcontroller used on the Arduino board is essentially used for
controlling all major operations. The microcontroller is used to coordinate the input taken and
execute the code written in a high-level language.
• Analog Reference pin: Analog pins are used for general purposes like supporting 10-bit analog-
to-digital conversion (ADC) which is performed using analog the Read() function. Analog pins are
particularly helpful since they can store 0-255 bits which is not possible using digital pins.
• Digital Pins: Digital pins are used for general purposes like taking input or generating output.
The commands that are used for setting the modes of the pins are pinMode(), digitalRead(), and
digitalWrite() commands.
• Reset Button: The reset button on the Arduino board is used for setting all the components of
Arduino to their default values. In case you want to stop the Arduino in between you can use
this reset button.
• Power and Ground Pins: As the name suggests, power and ground pins are used to supply the
power needed for driving the Arduino board. The ground pins are usually 0V to set a reference
level for the circuit.
• USB (universal serial bus): The Arduino needs certain protocols for communication purposes
and the universal serial bus is used for this purpose. It helps to connect Arduino,
microcontrollers with other raspberry pies.
Basic Operation
}
void loop () {
digitalWrite (12, HIGH);
delay (3000); // 3 seconds = 3 x 1000 milliseconds