We have a bunch of spots around our house where the previous owner had planted something, and for one reason or another, the plants are now dead. Not wanting to make the same mistake, I decided to make something useful out of the little IoT kit that I received at Build. It has been in a sort of planning phase for a while now (mostly while we wait for Winter to defrost); so I already had a few more of the components on hand and on order.
After testing out a simple photo resistor that I already had, I opted for the log-scale analog light sensor sold on Adafruit. Rather than forcing me to set the circuit up for a specific light range, it allows the device to be sensitive from 2-3 lux all the way up to 55000—direct sunlight. I also went for a waterproof enclosure, since it will sit outside for long periods of time unattended, and I don’t want it to get ruined in the elements. (The enclosure works beautifully, by the way—it rained for the first three days I had it outside, and I had no issues.)
I went with Adafruit.Io for my data logging, and initial data seemed promising. I also decided to log the battery output voltage to try to monitor the life of the device, as well as to log a data point whenever the device had to reset itself. I setup the watchdog timer, because initial versions appeared to lock up. Plus, resetting manually is kind of a pain when you’re using a waterproof enclosure.
After a little iterating, it seems like it is giving me useful data. Here you can see the device in three different areas over the course of three days—the first area getting full sun for maybe two to three hours, and the third not really getting much sun at all. Eventually I may clean my code up and release it, in case anyone else finds this useful.