CTY SAR FCPS Shawn Lupoli, Elliot Tan

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
Advertisements

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
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
Using the Arduino to Make an LED Flash Work in teams of two! living with the lab digital I/O pins (I/O = input / output) USB cable plug power pins.
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.
CHAPTER 8: Ohm’s law describes the Relationship of current, voltage, and resistance. UNIT 3: Electricity.
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.
Basic Circuits – Lab 1 Xmedia Spring Basically Power –Provides energy for the sensor and the output Sensor –Changes aspects of the circuit based.
Basic Circuits – Lab 1 Xmedia Spring Basically Power –Provides energy for the sensor and the output Sensor –Changes aspects of the circuit based.
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.
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
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.
Arduino libraries Datatekniker Udvidet hardware/software.
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.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
:Blink Blink: Er. Sahil Khanna
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
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.
Some Theory Voltage Resistance Current Ohm’s Law
Arduino.
Arduino Part 1 Topics: Microcontrollers
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
Microcontroller basics
UTA010 : Engineering Design – II
Do Now: Why does current not come from a battery? Explain.
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
UCD ElecSoc Robotics Club 2017/2018
INC 161 , CPE 100 Computer Programming
Arduino.
Introduction to Arduino Microcontrollers
How to avoid catching things on fire.
Roller Coaster Design Project
Why Make Electrons Flow Anyway?
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
Ohm’s Law The relationship between voltage, current and resistance is known as Ohm’s Law: V = IR Voltage (V) = Current (I) x Resistance (R) Volts.
Arduino programs Arduino toolchain Cross-compilation Arduino sketches
Programming 2: The Arduino IDE & First Sketches
Arduino Part 4 Let there be more light.
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Ohm’s Law and Circuit Basics
Arduino Motor Lab Inspired by NYU ITP project
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino 7 Segment Display Lab
Aeroponic Engineering and Vertical Farming
Arduino Leonardo Setup
Lab #1: Getting Started.
Arduino Uno circuit basics
Intro to Arduino Part 2 The Breadboard
SAURABH GINGADE.
Arduino程式範例.
Introduction to Arduino IDE and Software
CTY SAR FCPS Vedant mathur, Juliana schalkwyk
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

CTY SAR FCPS Shawn Lupoli, Elliot Tan Arduino LED Lab CTY SAR FCPS Shawn Lupoli, Elliot Tan

Let’s learn a bit about the parts we will be using…

Ohm’s Law Voltage = Current * Resistance  V = IR Voltage Current Electric potential difference Measured in Volts (V) Current Flow of electric charge Measured in Amperes (I) Resistance Conductor’s opposition to passage of electric current Measured in Ohms (Ω)

Reading Resistors

Example Problems

For a quick answer http://www.digikey.com/en/resources/conversion- calculators/conversion-calculator-resistor-color-code-4-band Make sure to select how many colored bands there are on the resistor If the URL has changed, please let your instructional staff know

Programming “Blink”

Overall Structure Global variables Void setup() { } Void loop() { } This function is called when a sketch starts Used to initialize variables, pin modes, and start using library Will only run once Void loop() { } Loops consecutively Allows your program to change and respond

Blink: Part 1 Initializing global variables Setup() The LED will be connected to pin 13, so initialize a global variable “ int led = 13 “ Setup() pinMode(pin, mode) configures the pin to behave either as an input or an output Initialize the digital pin 13 as output using function

Blink: Part 2 Loop() Functions Examples digitalWrite(pin, MODE) – HIGH enables voltage, LOW will disable voltage delay(int x) – Pauses the program for the amount of time in milliseconds Examples digitalWrite(13, High); Delay (1000)

CODE

Building the LED circuit

Supplies 1 Arduino board 1 breadboard 4 long wires (one red, one black) 1 LED 1 resistors (330 kΩ) * Notes: Wires are 22 or 24 AWG, solid Short wires = 5 cm Medium wires = 12 cm Long wires = 16 cm

Wiring the LED correctly

Diagram of LED circuit

Connecting Code and Circuit

Putting it All Together UPLOAD! Remember to check for the flashing RX and TX lights, and a “Successful upload” message in your console Understanding the process Since pin 13 is initialized as output, your computer tells the circuit what the do through pin 13 Turning on the LED, waiting, turning off the LED, waiting The switches will open and close the circuit, allowing the LEDs to either blink or not blink

Questions?