update

fun update()

Reads the color sensor (and distance sensor, if present) and refreshes the cache. Call this once per loop, before reading any properties.