Using Photoresistors with an Arduino

Slides:



Advertisements
Similar presentations
temperature system wiring
Advertisements

Using the servo library living with the lab Libraries are computer programs written to add functionality to Arduino programs. A library to control hobby.
Conductivity sensor implementation living with the lab © 2011 LWTL faculty team.
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2012 David Hall.
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.
User-defined functions in Arduino sketches living with the lab © 2012 David Hall.
Calibration of conductivity sensors living with the lab.
Thermistor calibration living with the lab © 2013 David Hall.
Cascaded switching of a solenoid valve living with the lab transistor relay solenoid valve © 2012 David Hall.
Switches & whiskers on the Arduino living with the lab lever arm switches mounted to Arduino © 2012 David Hall.
Using fixed-cell references and built-in functions in Excel living with the lab © 2012 David Hall.
220  470  Gnd5V Currents Through Parallel Resistors 1 living with the lab © 2012 David Hall.
Introduction to Microsoft Excel living with the lab © 2012 David Hall.
Kirchoff’s Current Law (KCL) living with the lab University of Pennsylvania Library and Wikipedia Gustav Kirchoff (left) and Robert Bunsen (right) Bunsen.
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.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Building Circuits.
Pump Fabrication Day Group A will draw their pump
Controlling Servos with the Arduino
Connecting Switches.
Series and Parallel Resistors
Pump Project Requirements
Introduction to the Arduino
Why Won’t My Arduino Work?
Robot Challenge Introduction
Troubleshooting Your Multimeter
Using servos.
calibration of conductivity sensors
Servo Library and Functions
Line Following Tips photoresistor circuits
Robot Assembly.
How to Use Dial Calipers
Controlling a Motor with Cascading Switches
Introduction to Transistors
Introduction to the Fishtank
RGB LEDs.
Conservation of Mass Problem
Maxbotix Ultrasonic Distance Sensor
Conductivity Sensor.
Introduction to Transistors
Servo Library and Functions
Troubleshooting Your Multimeter
a few of my favorite sensors
Relays.
using for loops to control LEDs
using the Arduino to make LEDs flash
Acquiring Data from an ADXL335 Accelerometer
Line Following Tips photoresistor circuit
Torque and RPM of Gears
Conservation of Mass Problem
Data Types.
analog and digital measurements
Finishing your Project
Using “if” statements.
Controlling the Heater
Digital Input from Switches
Implementing Switches Using Interrupts
Arduino: For Loops.
Non-Concurrent Force Systems
IR Object Detection IR detector IR LED IR light reflected off object
Radio Frequency Transmitter and Receiver
Interfacing a Rotary Encoder with an Arduino
Conservation of Mass Problem
Non-Concurrent Force Systems
Evaluating Design Alternatives
Counting Servo Gear Teeth (FS90R Servos)
Static Equilibrium Problem
Reservoir Loop.
Freshman Design Expo Presentations
Presentation transcript:

Using Photoresistors with an Arduino

DISCLAIMER & USAGE The content of this presentation is for informational purposes only and is intended for students attending Louisiana Tech University only. The authors of this information do not make any claims as to the validity or accuracy of the information or methods presented. Any procedures demonstrated here are potentially dangerous and could result in damage and injury. Louisiana Tech University, its officers, employees, agents and volunteers, are not liable or responsible for any injuries, illness, damage or losses which may result from your using the materials or ideas, or from your performing the experiments or procedures depicted in this presentation. The Living with the Lab logos should remain attached to each slide, and the work should be attributed to Louisiana Tech University. If you do not agree, then please do not view this content. boosting application-focused learning through student ownership of learning platforms

Implement photoresistor circuit 5V analog input 2 photoresistor 10kW

Enter and run the following sketch int val = 0; // variable to store value read at analog pin 2 void setup() { Serial.begin(9600); // set up to print out text to monitor } void loop() { val = analogRead(2); // read analog input pin 2 Serial.println(val); // print value to serial monitor What happens to the values on your serial monitor when you put your hand over the photoresistor?

Implement photoresistor and LED circuits 220Ω digital pin 11 5V analog input 2 photoresistor 10kW

Enter and run the following sketch int val = 0; // variable to store value read at analog pin 2 void setup() { Serial.begin(9600); // set up to print out text to monitor pinMode(11,OUTPUT); // declare pin 11 as an output } void loop() { val = analogRead(2); // read analog input pin 2 Serial.println(val); // print value to serial monitor if(val < 600) // if statement used to control LED { digitalWrite(11,HIGH); delay(100); digitalWrite(11,LOW); delay(100); How does the photoresistor control the LED?