#include "moje_lib.h" #include "msp430g2231.h" #define LED1 BIT0 #define LED2 BIT6 #define S2 BIT3 #define DEL1 5000 void main(void) { WDTCTL = WDTPW + WDTHOLD; P1DIR |= (LED1 + LED2); P1OUT &= ~(LED1 + LED2); for(;;) { while ((P1IN & S2) != S2) { P1OUT &= ~(LED1); delaytime(DEL1); submitfce(LED2); } P1OUT ^= LED1; delaytime(DEL1); } }