Refactor types and easing function in Arduino sketch for simplicity.