void loop()
{
potentioValue = analogRead(0);
potentioValue = map(potentioValue, 0,1023,255,0);
analogWrite(9, potentioValue);
}
or
void loop()
{
potentioValue = analogRead(0);
potentioValue = 1023 - potentioValue
potentioValue = map(potentioValue, 0,1023,0,255);
analogWrite(9, potentioValue);
}
?