Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 6 Digital Inputs
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Electrical team Arduino tutorial I BY: JOSHUA arduini
Lab7: Introduction to Arduino
Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and.
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
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.
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Introduction.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
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.
Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Microprocessors Tutorial 1: Arduino Basics
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Introduction to the Arduino
Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.
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
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
PHY 235 Robotics Workshop Day 4 Robotic Behaviors, Light Sensing, Voltage Dividers, LCD-MOD.
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. ARDUINO BASICS Credit to: Sparkfun and Linz Craig, Nick Poole, Prashanta Aryal, Theo Simpson, Tai Johnson,
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.
Microcontroller basics Embedded systems for mortals.
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
ICTWays workshop “Creativity and imagination in the classroom: Arduino and its application samples” LLP PT-COMENIUS-CNW
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
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.
Having fun with code, using Arduino in a middle school CS classroom
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Breadboards and LED’s with Arduino
Assist. Prof. Rassim Suliyev - SDU 2017
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
UTA010 : Engineering Design – II
UCD ElecSoc Robotics Club 2017/2018
Arduino - Introduction
Control the color and brightness of an RGB LED with a Potentiometer
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Analog Input through POT
Roller Coaster Design Project
Introduction to Arduinos
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.
All you wanted to know about Arduino (and somethings you didn’t)
What is an Arduino ? Open Source electronic prototyping platform based on flexible easy to use hardware and software.
What is Arduino? By James Tedder.
FeMaidens Programming
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
CTY SAR FCPS Shawn Lupoli, Elliot Tan
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Aeroponic Engineering and Vertical Farming
Arduino UMBC IEEE Sekar Kulandaivel
Lab #1: Getting Started.
Arduino Uno circuit basics
Prototyping with Micro-controllers, Sensors, and Materials
Arduino程式範例.
Presentation transcript:

Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009

2 Preliminary Information  Workshop schedule  Competition rules  Parts list  Checking-out parts  Teams  Weekly evaluation forms

3 Agenda for Today  Quick Review  Varying LED brightness  Controlling multiple LEDs  Sensors/Actuators (pots & light sensors)  Controlling devices using sensor input

4 Arduino Development Cycle

5 Arduino Programming  Declare variables, defines, and includes at top

6 Arduino Programming  Setup() –run once at beginning, set pins

7 Arduino Programming  loop() –run repeatedly, after setup()

8 Common Constructs  if (i < 10) { // statement(s) } else if(i > 10){ // statement(s) } else { // statement(s) }  for ( i = 0; i < 10; i++) {// statement(s)}  while(expression){ // statement(s)}

9 Arduino Common Functions  pinMode() –set a pin as input or output  digitalWrite() –set a digital pin high/low  digitalRead() –read a digital pin’s state  analogRead() –read an analog pin  analogWrite() –write an “analog” value  delay() –wait an amount of time

10 Today’s Kit 1.Arduino Microcontroller/ USB Cable 2.Breadboard 3.Resistor: 220 ohm, 10K ohm 4.6x Red LED 5.CdS Cell 6.Wires

11 Varying LED  Same circuit as Blink circuit but pin 9 instead of pin 13

12 Wire it up!  Going from schematic to physical circuit

13 Solderless Breadboard

14 All Wired Up!

15 LED Fading Sketch  Load “File/Sketchbook/Examples/Analog/Fading”

16 Controlling Multiple LEDs

17 Controlling Multiple LEDs

18 Controlling Multiple LEDs Sketch

19 Sensors Light Sound Temperature Motion Acceleration Position Proximity Bearing Altitude Location Humidity Magnetic field Pressure Flow Bend/Stretch Capacitance (touch) RF energy

20 Cadmium Sulfide (CdS) Cell – The Photoresistor Variable resistor that changes resistance depending on the amount of light shined upon it. It has no polarity (you can wire either way) Bright light creates low resistance No light creates high resistance

21 Controlling LED using CdS Cell input

22 Controlling LED using CdS Cell input Code

Questions or Comments? 23