Arduino and Photocell

This is an experiment out of the Getting Started with Arduino book. As you can see, an analog port is connected to a circuit with a photocell (Radio Shack part 276-1657) and resistor (220 ohm).

I used a flashlight to vary the light falling on the photoresistor, and used the Arduino IDE serial monitor to track the response at analog pin A0. (This is all covered in Getting Started with Arduino, Chapter Five: Advanced Input and Output.)

Here’s what the serial monitor reported:

(BTW, I originally used the 10K resistor recommended in the book, but the swing in output didn’t seem big enough for what I have in mind. I don’t think there’s a risk of burning out the Arduino or the photocell with a 220 ohm, but maybe I should check on that.)

This project actually relates to my budget robot, since I need a way of manually switching it between two modes. I figured that shining a light on a photoresistor was cooler than chasing the robot around and having to physically pull out a wire to make it stop.

This week I made progress on revising the Computer/Processing side of GIRC for my servo-driven budget robot, and now that I have a way to switch modes on the Arduino, I can start work on the Arduino/Wiring side of GIRC.

About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

1 Response to Arduino and Photocell

  1. SEO says:

    Hi there! I just would like to give an enormous thumbs up for the nice data youˇ¦ve
    gotten right here on this post. I shall be coming back to your weblog for extra soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s