Arduino Intro
Arduino Intro
Contents:-
�
�
• What is Microcontroller?
• What is Arduino ?
• Arduino UNO board
• Analog to Digital conversion
• Getting started with Arduino programming
• Practical Applications
�
Microcontrollers
�
Arduino UNO
Arduino is an open-source electronics platform based on
easy-to-use hardware and software. It consists of
microcontroller boards that can read inputs (like sensors,
buttons, or data from the environment) and control
outputs (such as LEDs, motors, and displays) using
simple programming.
�
�
• analogWrite(2,128)-
�
�
PinMode
�
�
2. Variables
name = "Alice"
age = 14
print(name)
5. If Statements (Decisions)
temperature = 30
if temperature > 25:
print("It's hot!")
else:
print("It's cool!")
�
�
Software
�
�
�
for i in range(5):
print("Loop", i)
def say_hello():
print("Hello!")
say_hello()
TASK 1
Program the Arduino to turn the LED on
and off at regular intervals of time by
using the software
https://youtu.be/I0ZIrzoI61g
�
�
�
Steps:-
�
• Connect the positive (longer) leg of the LED to pin 8 on the Arduino.
• Connect the negative (shorter) leg of the LED to one side of the
resistor.
• Connect the other side of the resistor to GND (ground) on the Arduino.
• Open the Arduino IDE.
• Click File > New to create a new sketch.
• Copy and paste the code.
• Connect the Arduino board to your computer using the USB cable.
Select the correct board: Click Tools > Board > Arduino Uno (or your
board model).
• Select the correct port: Click Tools > Port > COMx (Arduino) (COM
number varies).
• Click the Upload button (🔼) to send the code to the Arduino. Wait for
the "Done Uploading" message in the Arduino IDE.
T
5 �
�
THANK
YOU