implementation of arduino map() function
simple servo implementation