Rewrite value cycle code

The value cycling up/down is now an individual function with a great
deal of control via function params.
Can be used for almost anything which needs it's value to
increase/decrease over a set period, with a min/max, eg, down to 10, up
to 500, inc/dec by 2 every 3 seconds.