performance update for the light sensor, still experience blocking
final performance improvment: Time is now only spend in math functions :)