TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: Jonty on October 18, 2015, 04:26:20 PM

Title: Ambient Light Sensor Sketch
Post by: Jonty on October 18, 2015, 04:26:20 PM
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
Title: Re: Ambient Light Sensor Sketch
Post by: 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
Title: Re: Ambient Light Sensor Sketch
Post by: Jonty on October 22, 2015, 09:40:06 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.
Title: Re: Ambient Light Sensor Sketch
Post by: Ben Rose on October 25, 2015, 04:51:15 PM
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