int ledPin = 13;
int inPin = 7;                 // slider variable connecetd to analog pin 0
int value = 0;

void setup() 
{
  pinMode(ledPin, OUTPUT);              // initializes digital pin 13 as output
  pinMode(inPin, INPUT);                // initializes digital pin 7 as input
  beginSerial(9600);
}

void loop() 
{
  value = digitalRead(inPin);   // reads the value at a digital input 
  digitalWrite(ledPin, value);           
  if (value)
  {
	serialWrite('H');
  } else {
	serialWrite('L');
  }
  delay(1000);			// just not to overload the port, we wait 1sec
}