As the analogRead from the potentiometer input returns a value from 0-1023, in this ‘sketch’ we divide that value by 4 to get a value within the 0-255 range required.
Output Connections of relay module you may also like to read Xbee interfacing with arduino