Issues with connecting a slideswitch to change between automatic and manual mode for a fan

I tried to make
int potentiometer = A1;

it didn't work