Microprocessors Tutorial 1: Arduino Basics

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
How to use Arduino By: Andrew Hoffmaster.
Embedded Sumo 1T4 – 1T5 UTRA.
Secret Door Knock Detector
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Introduction.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Introduction to Microcontrollers: Arduino Skylar Roebuck and Lucas Libraro.
1 Applied Control Systems Technology. 2 Pin configuration Applied Control Systems.
Microprocessors Tutorial 1: Arduino Basics
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Microprocessors Tutorial 1: Arduino Basics
Microprocessors Tutorial 2: Arduino Robotics. Agenda 1. Robot Anatomy 2. Sensor Review 3. PWM 4. MAKE: Fade 5. Motors 6. H Bridge 7. Robot Control library.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. ARDUINO BASICS Credit to: Sparkfun and Linz Craig, Nick Poole, Prashanta Aryal, Theo Simpson, Tai Johnson,
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Arduino The Internet of Things: Using the Arduino to Teach Coding.
Arduino Training New Mexico Mathematics, Engineering, and Science Achievement (NM MESA) Getting Started.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Intro to Arduino Basic Arduino John Wolf (WolfDenElectronics.com)
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
The Internet of Things: Using the Arduino to Teach Coding
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Arduino Part 1 Topics: Microcontrollers
Embedded Systems Intro to the Arduino
Getting Started: Building & Programming
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Assist. Prof. Rassim Suliyev - SDU 2017
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microcontroller basics
UTA010 : Engineering Design – II
Arduino Development for Beginners
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino - Introduction
How to avoid catching things on fire.
Roller Coaster Design Project
Introduction to Arduinos
Roller Coaster Design Project
What is an Arduino ? Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Arduino 101 Credit(s):
Secret Door Knock Detector
Arduino programs Arduino toolchain Cross-compilation Arduino sketches
Arduino : Introduction & Programming
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
Sensors and actuators Sensors Resistive sensors
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Lab #1: Getting Started.
Arduino Uno circuit basics
Arduino Board.
Arduino म्हणजे काय?.
Introduction to Arduinos
Introduction to arduino
Presentation transcript:

Microprocessors Tutorial 1: Arduino Basics

Agenda 1. Arduino Hardware 2. Arduino Software 3. MAKE: Blink 4. Electronics 5. MAKE: LED control 6. Analog 7. MAKE: Servo Control 8. MAKE: Volume control 9. Links

Arduino Hardware Reset button 14 Digital Pins (6 PWM) USB ATMega 328 Power USB Voltage Regulator ATMega 328 SDA/SCL 6 Analog Pins Powering the board

Arduino Software Menu bar: set device, port, find examples Code: setup(), set pin direction pinMode(pin, IN/OUTPUT) loop(), set pin value with digitalWrite(led, HIGH/LOW) Or get pin value with digitalRead(pin) Buttons: verify and upload code -set device under tools> boards -set port before uploading (in tools) -sketches r for LATER, write your own code! Code for BLINK uses DIGITAL methods Connect arduino, if windows not found find driver in DEVICE MANAGER, see port, then upload

MAKE: Blink Using built in LED, so no further electronics needed! Connect Arduino Windows driver found? Correct port? Upload code from Example -set device under tools> boards -set port before uploading (in tools) -sketches r for LATER, write your own code! Code for BLINK uses DIGITAL methods Connect arduino, if windows not found find driver in DEVICE MANAGER, see port, then upload

Electronics Breadboard: vertical connections, horizontal buses LEDs: polarized, long == + Resistor: Color-coded. Need one for LED Push Button: completes circuit only while pushed. Use a pull down resistor! LED res: ohms law 5v , 20mA Pulldown: floating when no tpressed

MAKE: LED control Hardware Connect buses to bread board, 5v and GND 2. Connect LED, pin->220ohm -> LED+ ->GND 3. Connect button, 5v ->button ->10kohm ->GND before res ->pin Dont need arduino for this, but for educational purposes

MAKE: LED control Software Declare 2 pins outside and set direction in setup() Read button state If button is on, write desired output to LEDs

MAKE: LED control CHALLENGES: (╯°□°)╯︵ ┻━┻ Ask the user for a natural number between1-6 and then turn that LED on Hint: you can get input via Serial.read() LED’s should flash repeatedly after pressing the button, and should stop after the second press Hint: Boolean Red LEDs start ON, after holding the button for 3 seconds, the green LEDs turn on Ask for two inputs and Make a simple adder Hint: Add the two numbers together Convert the result from integer to binary The largest number you can show with 6 LEDs in binary is 111111 = 63 in decimal

Analog Digital: 0-1, On/Off LEDs, switches digitalRead(), digitalWrite() Analog: 0-1023 Potentiometer, sensor, motors AnalogRead(), analogWrite() to pin +5v Potentiometer: variable resistance

MAKE: Servo Controller Connect the Servo (Don’t forget to import the servo library and make an instance of the Servo class) Connect the Potentiometer Read the Value from the potentiometer Map that value to a number between 0 to 180 Take the new range (0-180) and use it as an input for the servo to rotate it Hint: use attach(), write()

Things to Consider: NEVER connect a motor directly to the Arduino (Why?) Use a switch (transistor) or a relay to control ALWAYS refer to the datasheet of the components When in doubt…..GOOGLE!

MAKE: Volume Indicator Hardware Add more LEDs, each going to a different pin Connect potentiometer, center connection to pin We will b using only 4 leds i think

MAKE: Volume Indicator Software Add LED pin variables and set direction Add pot pin, analog pin don't need direciton Get pot value Scale it using map(number, origStart, origEnd, scaledStart, scaledEnd) If pot level is higher than LED indicator, write desired output to LED We will b using only 4 leds i think Imagine replacing input to a microphone, or headphone jack!

Useful Links Arduino Examples http://arduino.cc/en/Tutorial/HomePage MAKE projects http://makezine.com/arduino/ http://makezine.com/category/electronics/arduino/?post_type=projects Adafruit We will b using only 4 leds i think Imagine replacing input to a microphone, or headphone jack!

academics@ieee.concordia.ca ieee.concordia.ca Questions? Comments? Suggestions? academics@ieee.concordia.ca ieee.concordia.ca