0% found this document useful (0 votes)
1 views

Getting Started With Arduino IDE (1)

This presentation provides an introduction to Arduino programming, covering IDE setup, core functions, and the use of digital and analog I/O. It includes a mini-project for creating an Auto Light System using sensors. The document encourages practice with various sensors and exploration of advanced topics in Arduino programming.

Uploaded by

st245216
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Getting Started With Arduino IDE (1)

This presentation provides an introduction to Arduino programming, covering IDE setup, core functions, and the use of digital and analog I/O. It includes a mini-project for creating an Auto Light System using sensors. The document encourages practice with various sensors and exploration of advanced topics in Arduino programming.

Uploaded by

st245216
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Getting Started with

Arduino IDE
This presentation guides you through the basics of Arduino
programming. Learn about the IDE setup and core functions.
Discover digital and analog I/O and how to use sensors. We'll
end with a mini-project: Auto Light System!

SV
by SOORAJ VS
Installing Arduino IDE
First, download the Arduino IDE from the official Arduino website.

Select the appropriate version for your operating system


(Windows, macOS, Linux).

Follow the installation instructions provided on the website.


Ensure drivers are correctly installed.

Download

Install

Drivers
Arduino Programming Basics
Arduino programs are structured around two essential functions:

setup(): This function runs once at the beginning. It is used to


initialize variables, pin modes, and start libraries.

loop(): This function runs continuously. The main program code goes here.

Setup()
Initialization

Loop()
Main Program
Digital vs Analog I/O
Digital I/O: Digital pins are either HIGH (5V) or LOW (0V). Use them for simple on/off control.

Analog I/O: Analog pins can read a range of voltage values (0-5V). Use them for sensors that provide variable readin

Digital I/O Analog I/O

On/Off control Variable readings


Blinking an LED
Here’s the code to blink an LED connected to digital pin 13:

void setup() {
pinMode(13, OUTPUT);
}

void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}

This code sets pin 13 as an output, then toggles it HIGH and LOW with a 1-second delay.
What is a Sensor?
A sensor is a device that detects a physical quantity. Then, it
converts it into an electrical signal.

Examples: Light Dependent Resistor (LDR), DHT11


(temperature and humidity), PIR sensor (motion).

Sensors enable Arduino to interact with the environment.

LDR DHT11 PIR


Using Sensors with Arduino
Connect the sensor to the Arduino board. Use appropriate pins for digital or
analog input.

Read sensor data using functions like digitalRead() for digital sensors and
analogRead() for analog sensors.

Process the data to control other components or make decisions.

Connect

Read Data

Process
Common Sensor Code Example
Example code for reading an analog sensor (e.g., LDR on pin A0):

int sensorPin = A0;


int sensorValue = 0;

void setup() {
Serial.begin(9600);
}

void loop() {
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(100);
}

This code reads the analog value and prints it to the serial monitor.
Mini Project – Auto Light System
Create an automatic light system using an LDR.

When the LDR detects low light, turn on an LED.

Use analogRead() to read the LDR value. Use digitalWrite() to control the LED.

Check Value
2

Read LDR
1

Turn On LED
3
Summary & Next Steps
You've learned the basics of Arduino IDE, programming, and
sensors. Practice with different sensors and projects.

Explore more advanced topics: libraries, communication


protocols, and IoT applications.

Practice

Explore

You might also like