Using LDR and LM35 at the same time

Hi All,

I seem to be having a few problems, (and I took a 29 year break from electronics so I am rusty).

I have managed to interface my Arduino Duemilanove with an LDR and with a LM35 sensor, the problem is that I use the LM35 with 1.1v internal source and the LDR with 5v source to get the better results. Any ideas on how I can do both at the same time? (the LDR seems to have 100R - 47K resistance).

I tried to force the LDR to 1.1volts by a voltage divider 28R but it looks to be a logarithmic result, so I loose a lot of accuracy (tracking daylight).

My other thought was to use the 3.3v line as a reference connecting it to Aref? would this work?

TIA

Regards

Darren

AS the voltage reference is switchable in software then just switch in the right one before taking the reading.

I tried to force the LDR to 1.1volts by a voltage divider

That will work as well, how are you connecting it up. It should be LDR to ground and input with a pull up resistor.

so I loose a lot of accuracy (tracking daylight).

You don't want to track the sun do you?

I have code for that :)

http://www.mowcius.co.uk/suntrackercode.html

Mowcius