Combining an LDR sensor with random blinking

RuggedCircuits - I've got the LDR connected to a resistor, into the ground and 5.v of my arduino uno board?

AWOL - Should I not have the digital write function in the code?