Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.

Slides:



Advertisements
Similar presentations
Wireless Cue Light Project
Advertisements

ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Lab7: Introduction to Arduino
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Embedded Sumo 1T4 – 1T5 UTRA.
temperature system wiring
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2012 David Hall.
Introduction to Arduino Programming January MER-421:Mechatronic System Design.
Waterproofing a thermistor ENGR 121 living with the lab © 2013 David Hall.
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.
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.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
Finish your programs from last week STOPLIGHT CIRCUIT! You may need … – int – void setup() – void loop() – pinMode – digitalWrite – delay.
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2011 LWTL faculty team.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Basic Circuits – Lab 2 Arduino and Sensors
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Tips for fishtank programming living with the lab © 2013 David Hall.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Cascade switching of an LED EAS 199B Winter 2013.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
Good LED Circuit 5V0 GND. What Voltage Does Meter See? Answer: 5 V.
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
Line following tips photoresistors positioned near floor photoresistor circuits © 2011 LWTL faculty team living with the lab.
Arduino libraries Datatekniker Udvidet hardware/software.
Using for loops to control LEDs living with the lab 1 1 arduino.cc the for statement allows us to repeat a block of commands a limited number of times.
ME 120: User-defined functions: average analog input reading Arduino Programming – Part 5: User-defined functions ME 120 Mechanical and Materials Engineering.
Microcontroller basics Embedded systems for mortals.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
:Blink Blink: Er. Sahil Khanna
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Electronic instrumentation Digitization of Analog Signal in TD
Pulse-Width Modulation: Simulating variable DC output
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
Ultrasonic Sensor TYWu.
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
Arduino Application: Speed control of small DC Motors
ME 120: Photoresistors and Arduino Programming Arduino Programming Case Study: Photoresistor Measurements ME 120 Mechanical and Materials Engineering Portland.
Hacking on Arduino George Patterson
Val Manes Department of Math & Computer Science
Arduino Programming Part II
Cascade switching of an LED
Get Your Project Started with Arduino
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Line Following Tips photoresistor circuits
INC 161 , CPE 100 Computer Programming
Arduino.
Roller Coaster Design Project
using for loops to control LEDs
Using Photoresistors with an Arduino
Line Following Tips photoresistor circuit
Last of the LED’s and Arduino
Arduino: For Loops.
IR Object Detection IR detector IR LED IR light reflected off object
Topics: Programming Constructs: loops & conditionals Digital Input
Programming 2: The Arduino IDE & First Sketches
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino 7 Segment Display Lab
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team

implement photoresistor and LED circuits 2 living with the lab 5V analog input 3 photoresistor 10k  330Ω digital pin 11

3 living with the lab int photo_pin = 3; // Analog input pin for photoresistor int LED_pin = 11; // Digital output pin for LED void setup() { Serial.begin(9600); // Open serial communication w/ host PC pinMode(LED_pin,OUTPUT); // Configure LED_pin for output } void loop() { int val = 0; // Stores reading of analog input val = analogRead(photo_pin); // Read voltage on photo_pin Serial.println(val); // print value to serial monitor if(val < 600) { // if statement used to control LED digitalWrite(LED_pin,HIGH); delay(100); digitalWrite(LED_pin,LOW); delay(100); } enter and run the following sketch

if statement details 4 living with the lab if (x > 50) { // do something here } comparison operators x == y x is equal to y x != y x is not equal to y x < y x is less than y x > y x is greater than y x <= y x is less than or equal to y x >= y x is greater than or equal to y arduino.cc