#include <SoftwareSerial.h>

SoftwareSerial mySerial(0, 2); // RX, TX from point of view of chip

int analogPin = 4; // potentiometer wiper (middle terminal) connected to analog pin 3 -- Physical pin 3
// outside leads to ground and +5V
int val = 0; // variable to store the value read

void setup()
{
mySerial.begin(9600); // setup serial
}

void loop()
{
val = analogRead(analogPin); // read the input pin
mySerial.println(val); // debug value
delay(1000);
}