Updated types etc.

Changed a couple of times to cope with the timers and re-coded the wave
transition a bit. Next update will be changing it to serial.read
instead of timed (still problem with Arduino Yún)