Continuing with LED’s and Arduino

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
Do you think that this bulb will light up? Build the circuit and check your prediction Fix the circuit so that the bulb does light up. A.
Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
Intro to Programming and Microcontrollers. Activity Group into pairs and sit back-to-back. Pick one person who is going to draw. The other person will.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
Finish your programs from last week STOPLIGHT CIRCUIT! You may need … – int – void setup() – void loop() – pinMode – digitalWrite – delay.
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.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Microprocessors Tutorial 1: Arduino Basics
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis.
Microprocessors Tutorial 1: Arduino Basics
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
MAKE: AN ELECTRONICS WORKSHOP
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.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Atmega328p Introduction for Digital and PWM Output Brion L Fuller II Robotics Club.
:Blink Blink: Er. Sahil Khanna
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
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Arduino Part 1 Topics: Microcontrollers
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Breadboards and LED’s with Arduino
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
More on LED’s with Arduino
Microcontroller basics
Sound Effects with Arduino
Arduino & its hardware interfacing
An Arduino Workshop A Microcontroller.
Cascade switching of an LED
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
UCD ElecSoc Robotics Club 2017/2018
Sensors with Arduino A Microcontroller.
3.0 ARDUINO WORKSHOP PRESENTATION FOR STUDENTS IN 4º DEGREE OF COMPULSORY SECONDARY EDUCATION 3.0.
LCD’s with Arduino A Microcontroller.
Introduction to Arduino Microcontrollers
Lighting LEDs with a RASPBERRY PI
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
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.
IoT Programming the Particle Photon.
Chapter 2 Push button and Potentiometer
Arrays, For loop While loop Do while loop
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Last of the LED’s and Arduino
Arduino Part 4 Let there be more light.
Arduino Motor Lab Inspired by NYU ITP project
Aeroponic Engineering and Vertical Farming
Lab #1: Getting Started.
Arduino Uno circuit basics
Setting up a basic program with Arduino
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Objective of the lesson
Interrupts.
Presentation transcript:

Continuing with LED’s and Arduino A Microcontroller

Exploring concepts – trouble shooting Check it is plugged in, powered on (connected) and the board type and com port has been set Blink test – confirms all is good (pin on the PCB will blink, if the LED doesn’t => faulty LED) LED pins in the right way around? Then check your physical connections Make sure components aren’t touching each other and creating short circuits (this often happens with the resistors) Still not working? Get a working blink test with a resistor and LED – then swap connectors to test them

Exercise 13 - Multiple LED’s with chase effect <File>, <Examples>, <SIK_Guide_Code_32>, <Circuit_04>

Notes on the code An array lets you store a group of variables (int ledPins[] = {2,3,4,5,6,7,8,9};) creating an index. The index count starts at zero (this is is an index from 0 to 7) We're using the values in this array to specify the pin numbers that the eight LEDs are connected to. LED 0 is connected to pin 2, LED 1 is connected to pin 3, etc. Every for() loop has three statements separated by semicolons (;): Something to do before starting A test to perform; as long as it's true, keep looping Something to do after each loop (increase a variable)

Notes on the code So start at index = 0, add one each loop, when it reaches 8 (as we have 7 in our index) proceed with the next block of code index++ - after a variable means "add one to it". for(index = 0; index <= 7; index++) – go up through the LED’s turning on for(index = 7; index >= 0; index--) – go down through the LED’s turning off

Exercise 14 - Interactive LED Chase effect Add a Pot Where do the LED’s draw power from? Why the digital GND rather than the analog GND? The Pot is a variable resistor, what is it doing here?