More robust color sensing, refactor control tick frequency