Using a mapped value which is then ramped analog output

squid08:

Arrch:

squid08:
How does it look?

Not indented.

?

'Indenting' refers to laying out your code so that the structure can be seen and understood. It doesn't affect the logic, but does affect how easy it is for the programmer to understand the logic. The code you posted wasn't indented and as a result is very hard to follow. The Arduino IDE includes tools to indent your code for you.