added mapAnalogtoPWM functions

unmap function added as well. Code needs serious cleanup.