hamishcunningham / fishy-wifi

Scripts, notes and the odd subaquatic gizmo for the ESP8266 and what-have-you.
GNU Affero General Public License v3.0
25 stars 13 forks source link

Try four different combinations of gain and integration time with des… #7

Closed DrRob closed 9 years ago

DrRob commented 9 years ago

…creasing resolution until the returned value is within range.

If the light level is within the range supported by the old code, then the values returned will be the same. If the light level is higher, then getchannels() will take longer to run (because it tries up to four different combinations of gain and integration time until it finds one that is within range), and return larger values.

Even with this change, in full sun the values can still hit a maximum value.