I think that you could do it quite easily with a light dependent resistor to A0 on an ESP12 device such as a LoLin.. You’d just need a dropping resistor drop the voltage to 1V and possibly a potentiometer
Regards
Phil K
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Your circuit is almost right but the LDR would be between A0 and 0V and the 10k resistor between 3.3V and A0. At least that's how I would do it. From memory LDRs resistance decreases with increasing light intensity so the voltage would increase and, again from memory, I think the max voltage at A0 is supposed to be 1V but I may be wrong. If you're allowed 3.3V your circuit would give you a larger number with brighter light so is more intuitive.
The Lolins are also known as Wemos. The Lolin V3 is slightly bigger. Search for ESP-12 E.
The latest allsensors.bin has A0 set as Analogue input as standard and just select the generic module.
Hope that helps
Regards
Phil K
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
They have a Flash button next to the USB input
Regards
Phil K
--