intbuttonPin=3;// setup initializes serial and the button pin
voidsetup(){Serial.begin(9600);pinMode(buttonPin,INPUT);}// loop checks the button pin each time,
// and will send serial if it is pressed
voidloop(){if(digitalRead(buttonPin)==HIGH){Serial.write('H');}else{Serial.write('L');}delay(1000);}