Top Banner
GETTING STARTED IN ARDUINO PLATFORM ORGANIZED BY: DIGITRONIX, WRC w w w . d i g i t r o n i x n e p a l . b l o g s p o t . c o m
18

Arduino Day 1 Presentation

May 14, 2015

Download

Engineering

Yogendra Tamang

I have prepared this presentation when I was studying at Western Region Campus. I along with some of my friends conducted training for junior students on Arduino. Its day-1 presentation.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Arduino Day 1 Presentation

GETTING STARTED IN

ARDUINO PLATFORM

ORGANIZED BY:DIGITRONIX, WRC

ww

w.d

igitro

nix

nepal.b

log

spot

.com

Page 2: Arduino Day 1 Presentation

INTRODUCTION TO ARDUINO

- Open Source Hardware and Software Platform

-Self Contained Computer in an IC

=INTEL 286

Arduino Diecimila

Page 3: Arduino Day 1 Presentation

INTRODUCTION TO ARDUINO

- Based on AVR microcontrollers that are widely popular for their RISC architecture, hight flash memory, inbuilt different features

- Arduino Uses C programming(E A S Y)……

Page 4: Arduino Day 1 Presentation

WHY ARDUINO?

- Inbuilt ADC, Serial Interface, PWM, IO pins

-Programming so easy……(Can be used available libraries)

-Open Source platform

Page 5: Arduino Day 1 Presentation

HARDWARE

I/O PORTS ========== 14PWM ========== 6Analog ========== 6

8 bit =======25610 bit ======= 1023

ADC

Page 6: Arduino Day 1 Presentation

DIFFERENT B0ARDS

DUE

ELEVEN

UNO

Page 7: Arduino Day 1 Presentation

DIFFERENT B0ARDS

DUE

LILYPAD MEGANANO

Page 8: Arduino Day 1 Presentation

SOFTWARE REQUIREMENTS

Arduino IDE

Serial Port Driver

Page 9: Arduino Day 1 Presentation

ARDUINO PROGRAMMING BASICS

Void setup(){//your initialization code}

GLOBAL Variables1.

2.

Void loop(){//your repeating code}

3.

Page 10: Arduino Day 1 Presentation

Global VariablesInteger====int

Character====charString====string

Boolean====boolean

int ledInput=13; //pin 13 is ledIput

EXAMPLE:

Page 11: Arduino Day 1 Presentation

Setup()Put the code

for the initialization

Example

void setup(){Serial,begin(9600); //serial port baudrate=9600bpspinMode(ledInput, output); // configure pin 13 as output

port}

Page 12: Arduino Day 1 Presentation

loop()Put the code

that is required to be performed by

System.Example

void loop(){digitalWrite(ledinput, high); //led=ondelay(500);digitalWrite(ledinput, low); //led=offdelay(500);}

Page 13: Arduino Day 1 Presentation

Functions used in setup()1. pinMode(13, OUTPUT); makes pin 13 as output pin2. pinMode(8, INPUT); makes pin 8 as input pin3. Serial.begin(9600) ; starts serial communication with Baudrate 9600Functions used in loop()1. digitalWrite(13, HIGH): makes pin 13 high ie pin13=ON;2. delay(500) : delays system by 500 ms.3. analogRead() : Reads analog value4. analogWrite() : writes anlog value(PWM)5. Serial.print() : Prints at serial monitor6. Serial.println() : prints at serial monitor with line break

WRITE Down!

Page 14: Arduino Day 1 Presentation

EXERCISE:Write the code and implement:1. One led blinking at each 1s.2. A led with ON time=600ms and OFF time=900ms3. You are given 6 leds. Now light these leds in different

patterns

Page 15: Arduino Day 1 Presentation

Button Interfacingint ledPin = 13; // choose the pin for the LEDint inPin = 2; // choose the input pin (for a pushbutton)int val = 0; // variable for reading the pin statusvoid setup() {pinMode(ledPin, OUTPUT); // declare LED as outputpinMode(inPin, INPUT); // declare pushbutton as input}void loop(){val = digitalRead(inPin); // read input valueif (val == HIGH) {

// check if the input is HIGH (button released)digitalWrite(ledPin, LOW); // turn LED OFF} else {digitalWrite(ledPin, HIGH); // turn LED ON}}

Page 16: Arduino Day 1 Presentation

DEBOUNCE--What is debounce ?--Bistable Switch

Page 17: Arduino Day 1 Presentation

REVIEW:ARDUINO INTRODUCTION

ARDUINO PROGRAMMING

LED BLINKINGBUTTON INTERFACING

Page 18: Arduino Day 1 Presentation

THANK

YOU!

SE

E Y

OU

TO

MO

RR

OW

……

……

……

……

……

….