JesseWelling:
I'm trying to make a Digital (on/off) Photoresistor sensing unit (for a line follower). I plan on using a Potentiometer to tune the threshold in hardware instead of software, but is there any thing else I have to do besides makeing a circuit like this

and instead of the resistor put in a potentiometer and then hook it up to a digital port?

Admin:
Hey by complete coincidence I am currently working on the exact same project.

There are three things you also need.

One is as you said, a tuned resistor. Either a pot, or just a resistor if you already know which value to use.

The next is, you still want software threshold tuning. No way around this, trust me. But this is super simple. You just take the average of the sensor readings off the line and the sensor readings on the line.You should do this for each sensor. For example, if sensor A says 55 on the line and 102 off the line, do (55+102)/2 = threshold. Software thresholding is required because you can never predict a sunlight through the windows change in lighting where your robot will follow the line. My robot must work on a white line on light grey concrete outside rain or shine, according to the competition rules . . .http://www.societyofrobots.com/competitions_mobot.shtml

The 3rd item you need is an extra light source. Look up the datasheet for your photoresistor and see what wavelength it is the most sensitive to. For example, my photoresistors see green light the best. So I use green LED's to shine on the line so as to drown out ambient light. Of course, you must tune your photoresistor resistor to your LED. In all light based sensor robots, you must have a defence against ambient light (dont forget shadows!!!).

Just a side comment, you can also do this with infrared LED's and detectors too.

JesseWelling:
But you can't some how run it through a transitor to turn on once a certain Vo threshold is met using a pot?That seems like a better solution to me is to do hardware tuning....that way when you go to your compitition or test or whatever you load up a test program that just spits you on line off line digital signal to a readable output and you just crank on your pot over the black line till you get a "on the line reading"

Admin:
Hey if you know how to get rail to rail output that is immune to the environment, I want to be the first to know :P

What you would normally get is an analog value, where the difference between on the line and off the line is about a volt or two at max. And threshold can significantly change whether you have sunlight coming through your windows or not.

JesseWelling:
That's why i was thought I could tune it with a pot ;D am I dead wrong or....some of my EE friends seem to think it's possible....but we'll let you know how it goes.