F C&P Lab 13

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

LAB NO.

13
INTRODUCTION TO ARDUINO PROGRAMMING

LAB SESSION

Arduino programming is a popular and accessible way to enter the


world of electronics and physical computing. Arduino is an open-source
platform that includes both hardware and software components,
designed to make it easy for beginners and professionals alike to create
interactive projects.

• Hardware Overview:

1. Arduino Board:
The core of the Arduino platform is the Arduino board. It comes in
various models with different features, but they all have a
microcontroller at their heart. Common models include Arduino Uno,
Arduino Mega, Arduino Nano, etc.
2. Microcontroller:
The microcontroller is a small, programmable chip that serves as the
brain of the Arduino. It executes the code you write and interacts with
other components connected to the board.
3. Input/Output (I/O) Pins:
Arduino boards have a set of digital and analog pins that can be used
for input (reading data) or output (sending signals). Digital pins deal
with binary signals (on/off), while analog pins handle continuous signals
within a range.
4. Power Supply:
Arduino boards can be powered through a USB connection, an external
power supply, or a battery, depending on the model. Make sure to
choose the appropriate power source for your project.

• Software Overview:

1. Arduino IDE (Integrated Development Environment):


The Arduino IDE is a software application that allows you to write,
compile, and upload code to your Arduino board. It provides a user-
friendly interface for programming, even for those new to coding.
2. Sketch:
In Arduino, a program is referred to as a "sketch." It's a set of
instructions writte n in the Arduino programming language, which is a
simplified version of C/C++. A basic Arduino sketch consists of two main
functions: setup() (executed once at the beginning) and loop()
(executed repeatedly).

Arduino Sketch:
Steps to Run Your Arduino Sketch:
• Open the Arduino IDE.
• Copy and paste the above code into a new sketch.
• Connect your Arduino board to your computer using a USB cable.
• Select the correct board and port under the "Tools" menu.
• Click the right arrow button (Upload) to compile and upload your
sketch to the Arduino board.
As the sketch runs, the LED on pin 13 should blink on and off at one-
second intervals.

You might also like