Ambient Light Sensor Sketch

Started by Jonty, October 18, 2015, 04:26:20 PM

Previous topic - Next topic

Jonty

*
Newbie
Posts: 2
Logged
When I run the ambient light sketch the lux values are very low.  As the sensor is moved towards the light the readings drop and then go to 0.  Can someone help?  JB

Ben Rose

Administrator
*****
Hero Member
Posts: 392
Logged
Hi JB,

Can you give me a link to exactly where the code you used is, along with the Arduino IDE version etc if you compiled it yourself? I'll give it a try and see if I have the same results.

Thanks,
Ben

Jonty

*
Newbie
Posts: 2
Logged
Quote from: Ben Rose on October 20, 2015, 05:29:07 PM
Hi JB,

Can you give me a link to exactly where the code you used is, along with the Arduino IDE version etc if you compiled it yourself? I'll give it a try and see if I have the same results.

Thanks,
Ben

Hi Ben.  I thought I had fixed the issue, but it is still there.  I used the code of the Tiny Circuits site.  I have tried uploading it on mac and pc versions of Arduino IDE with no luck.  As soon as the sensor moves toward a bright light the lux value drops and then goes to zero.   It looks like the sensor it overwhelmed.

Ben Rose

Administrator
*****
Hero Member
Posts: 392
Logged
It is, at the previous default gain setting- I modified the codebender example at https://codebender.cc/sketch:34129?board=TinyDuino to add another setting and be able to default to the lowest gain(probably the best way for people to start out). Now you should get a much larger range, although I can still max it out if it's right next to a really bright light- hopefully not your use case. Let me know if this solves it.

Ben

SMF spam blocked by CleanTalk