Introduction to Arduino Microcontrollers

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Embedded Sumo 1T4 – 1T5 UTRA.
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Introduction.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Introduction to Arduino Microcontrollers
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Ballooning Bundle. What is a Microcontroller? Small computer with a processor core, memory and programmable input/output Continuously repeats software.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
L ILY P AD T RAINING C ENTENNIAL E LEMENTARY 2012 Material by Linz Craig Revision by Sarah Bloms Additional images by Modkit & Adam Meyer.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Microcontrollers, Microcomputers, and Microprocessors
Arduino The Internet of Things: Using the Arduino to Teach Coding.
Microcontroller basics Embedded systems for mortals.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Introduction to Arduino Microcontrollers (Death by Powerpoint)
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Arduino Part 1 Topics: Microcontrollers
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Val Manes Department of Math & Computer Science
Downloading Arduino FOR WINDOWS.
Microcontroller basics
Arduino & its hardware interfacing
UTA010 : Engineering Design – II
An Arduino Workshop A Microcontroller.
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
Arduino Development for Beginners
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino Uno and sensors
Introduction to Arduino Microcontrollers
Roller Coaster Design Project
Roller Coaster Design Project
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Visual Instructions.
What is Arduino? By James Tedder.
FeMaidens Programming
Arduino 101 Credit(s):
using the Arduino to make LEDs flash
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Banyule Coding Club: Learn Arduino Richard Counsel Malcolm Macleod Watsonia Library - June 2018 Reference materials here ->
Programming Micro Controllers
Chapter 1 Introduction of Arduino
Arduino Part 4 Let there be more light.
Intro to Micro Controllers
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Having fun with Arduino
Aeroponic Engineering and Vertical Farming
Lab #1: Getting Started.
Arduino Uno circuit basics
Introduction to Arduino
SAURABH GINGADE.
Introduction to Arduino IDE and Software
Interrupts.
Presentation transcript:

Introduction to Arduino Microcontrollers

Overview Background Hardware and Software Arduino C Microcontroller defined Why Arduino's? Hardware and Software Arduino C Electronic Circuits Projects Blinking light(s) Reading inputs (variable resistors)

Microcontrollers – One Definition Programmers work in the virtual world. Machinery works in the physical world. How does one connect the virtual world to the physical world? Enter the microcontroller. A microcontroller is basically a small-scale computer with generalized (and programmable) inputs and outputs. The inputs and outputs can be manipulated by and can manipulate the physical world.

Microcontrollers – One Definition A microcontroller is basically a small-scale computer with a small amount of memory and generalized (and programmable) inputs and outputs. The inputs and outputs can be manipulated by and can manipulate the physical world.

Why Arduino? For whatever reason, Arduino microcontrollers have become the de facto standard. Make Magazine features many projects using Arduino microcontrollers. Strives for the balance between ease of use and usefulness. Programming languages seen as major obstacle. Arduino C is a greatly simplified version of C++. Inexpensive ($35 retail).

Arduino Uno Close Up The pins are in three groups: 14 digital pins 6 analog pins power

Handling the Arduino - How NOT to Do It! Improper Handling - NEVER!!!

Handling the Arduino - The Proper Way Proper Handling - by the edges!!! Wash your hands after handling the boards. Solder contains lead (not RoHS compliant yet!)

Your Arduino Kit Should Include: 3 each, LEDs 1 each, Laptop 3 each, 220 W Resistors 1 each, USB cable 1 each, Breadboard 1 each, Arduino Pass out the checklists and inform students that they will be held responsible for all material lost or damaged (Unmet Obligations). The USB cable in your kit is blue, not black. The USB side plugs into the laptop and the other plugs into the Arduino board. 5 each, Jumper Wires

You and Your Partner Should: Collect your Arduino Kit Inventory your kit to ensure all parts are present Complete and sign your checklist Turn in signed Checklist and sign out a Laptop Remember the # on your Laptop, you will get the same laptop each day

Connecting the Arduino to a Laptop/PC Connect the Arduino UNO board to the laptop as shown in the picture to the right. One end of the cable should slide into one of the USB ports on the laptop; the other end of the cable attaches to the port on the UNO board. You should see the LED lights on the board come on when the connections are secure. Wash your hands after handling the boards. Solder contains lead (not RoHS compliant yet!)

Opening the Arduino Software After you have connected your Arduino to the laptop: Look for the Arduino Software icon on the desktop of your laptop. Open the software. Find this icon on your desktop and double-click on it.

Opening the Arduino Software After you have opened the Arduino software: Click on Tools->Serial Port Find and click on the Com Port being used by your Arduino Click on Tools->Board Confirm that you’re using the UNO

Programming - Functions Each Arduino program is has two required functions, SETUP and LOOP. Type the code in RED below into your program if it does not already appear there. void setup ( ) { } - All of the code within the curly braces will be run ONCE when the program first runs. void loop ( ) { } - This function is run AFTER setup has finished. All of the code within the curly braces will be run again, and again, until the power is removed.

Programming - Functions Each Arduino function have the same basic building blocks: an output, the function name, inputs and a place to store code. void setup ( ) { } Output Function Name Input Code Each line of code ends with a semi-colon (;).

Upload the code Upload your sketch by clicking on this arrow.

Programming - Routines Type the code in RED below into your SKETCH. void setup ( ) { pinMode(13, OUTPUT); } The Arduino C programming language is case-sensitive. Type in the code in RED exactly as you see it!!! void loop ( ) { digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); }

Blink Challenges: Modify the code to blink the light on for 2 seconds then off for 3 seconds. Notice how bright the LED appears when it is on. Modify the code to blink the LED on for 1/10 of a second and off for 1/10 of a second. Does the LED blink? Is it as bright as before? What do you think causes the difference?