Arduino Photoresistor

1,773

18

1

When building this device, the first step is to program what you want the LED and the photoresistor to do in Arduino programming software.

building a photo resistor is very easy if you follow this guide step by step.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Code

Use the code found here Instructables does not paste code very well. You will find a comment next to each line of code.

Step 2: Circuit Design

Step 3: Using Serial Port to Find Value

In Arduino IDE press CTRL+SHIFT+M to open the serial monitor. If everything was wired correctly you will see values that show the light the photo resistor is detecting. Place your hand over the photo resistor to find the new value of when the photo resistor is covered. With this photo resistor in changed from 850 to 650, so set Pr_Input = 0.

On a Budget Contest

Participated in the
On a Budget Contest

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    Discussions

    None
    seamster

    4 years ago on Introduction

    There is a great little tool in the editor for pasting code in your projects. It won't mess with the format at all. If you open up your project to edit and have a step open, look for the paragraph symbol (kind of like a capital P), and there's a pull-down menu with an option to insert a box for code. It's pretty slick! ;)