Color sensing (as well as detecting empty spaces) settled on IR-based sensors commonly used in line-following robots. You can watch the clock in action in the video embedded below just under the ...
There is, of course, an Arduino to grab the data and send ... but having a way to communicate with an $11 IR temperature sensor might come in handy someday. You do have to mash the measurement ...