this is my code ,but when i touch or connect empty pin led starts to glow
pls help me how to resolve this problem
#include <msp430g2231.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
while (1) // Test P1.4
{
if ((0x10 & P1IN)) P1OUT |= 0x01; // if P1.4 set, set P1.0
else P1OUT &= ~0x01; // else reset
}
}