Fox flasher MkII described a LED driver for an animal deterrent using a Chinese 8051 architecture microcontroller, the STC15F104E.
Above, the schematic. A very simple circuit with just a handful of electronic components (one capacitor, two resistors, one LDR, one Polyswitch, 4 x LEDs and the MCU). Note the capacitor in shunt with the LDR, it is to reduce noise and to provide a level of RFI protection.
Higher current LEDs can be driven with transistor switches.
The code includes various fixes and improvements. It remains compatible with v1 EEPROM images.
Above is a screen shot of an EEPROM image. The screenshot is from HHD Hex Editor Neo Ultimate using its structure viewer.
Above is a screenshot of the STC programming utility with appropriate choices for this project.
The hex files and example EEPROM binary files are available for download: FoxFlasher2.