minor refactoring to create a more general loop counter
silly bugfix introduced by refactoring
up_n_down: add some smoothing to brightness adjustments
Merge pull request #25 from wbattestilli/master

minor refactoring, byte saving, up_n_down update